Commit 84819edd authored by John Chodera's avatar John Chodera
Browse files

Patched large memory leak in Context cleanup for OpenCL platform.

parent 985da46e
...@@ -67,6 +67,7 @@ public: ...@@ -67,6 +67,7 @@ public:
class OpenCLPlatform::PlatformData { class OpenCLPlatform::PlatformData {
public: public:
PlatformData(int numParticles, int deviceIndex); PlatformData(int numParticles, int deviceIndex);
~PlatformData();
OpenCLContext* context; OpenCLContext* context;
bool removeCM; bool removeCM;
int cmMotionFrequency; int cmMotionFrequency;
......
...@@ -105,3 +105,7 @@ OpenCLPlatform::PlatformData::PlatformData(int numParticles, int deviceIndex) : ...@@ -105,3 +105,7 @@ OpenCLPlatform::PlatformData::PlatformData(int numParticles, int deviceIndex) :
device << context->getDeviceIndex(); device << context->getDeviceIndex();
propertyValues[OpenCLPlatform::OpenCLDeviceIndex()] = device.str(); propertyValues[OpenCLPlatform::OpenCLDeviceIndex()] = device.str();
} }
OpenCLPlatform::PlatformData::~PlatformData() {
delete context;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment