Skip to content
Snippets Groups Projects
Commit 1f31a78b authored by Federico's avatar Federico
Browse files

Fix memory leak

parent 3a3c55f4
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,7 @@ public:
/**
* Default constructor, results in an invalid iterator.
*/
pixel_iterator(): pixelLeft(0) {}
pixel_iterator(): pixelLeft(0), wr(nullptr) {}
/**
* Set a pixel and move the pointer to the next one
......@@ -275,6 +275,11 @@ public:
*/
void invalidate() {}
~pixel_iterator()
{
if(wr) delete wr;
}
private:
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment