Skip to content
Snippets Groups Projects
Commit ab0b8c44 authored by Eric Wait's avatar Eric Wait
Browse files

Fixed memory leeks.

parent ccc11e80
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,8 @@ public:
delete temp;
deviceImages[i] = NULL;
}
delete[] deviceImages;
}
CudaImageContainer<PixelType>* getCurBuffer()
......
......@@ -16,9 +16,9 @@
static void HandleError( cudaError_t err, const char *file, int line )
{
char* errorMessage = new char[255];
if (err != cudaSuccess)
{
char* errorMessage = new char[255];
sprintf_s(errorMessage, 255, "%s in %s at line %d\n", cudaGetErrorString( err ), file, line );
throw std::runtime_error(errorMessage);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment