FULLPIPE: Plug a memory leak in _dynamicPhases

Free the pixel data of each entry in the _dynamicPhases array before
emptying it
This commit is contained in:
Filippos Karapetis 2017-03-22 23:05:38 +02:00
parent 8bc03c87c5
commit 3e515890e8

View File

@ -1538,6 +1538,10 @@ Movement::~Movement() {
if (_updateFlag1)
_dynamicPhases.remove_at(0);
// FIXME: At this point, the last entry in _dynamicPhases is invalid
for (uint i = 0; i < _dynamicPhases.size() - 1; i++)
_dynamicPhases[i]->freePixelData();
_dynamicPhases.clear();
}