ofTheo/videoInput — Issue #4: memory leak
Author: ofTheo
Created: 2011-12-31 17:04:56+00:00
State: open

Thanks to your pretty work. I found some memory leaks in videoinput.cpp.
Here is the changes I have made for fixing it.

@@ -72,13 +72,13 @@ public:
//------------------------------------------------
~SampleGrabberCallback(){
ptrBuffer = NULL;
DeleteCriticalSection(&critSection);
CloseHandle(hEvent);
if(bufferSetup){
-	delete pixels;
+	delete [] pixels;
}
}

//------------------------------------------------
bool setupBuffer(int numBytesIn){