memory leak in love.image.newEncodedImageData()

Issue #62 resolved
the_leg
created an issue

There's a memory leak associated with love.image.newEncodedImageData(). The memory leaking is allocated in modules/image/devil/ImageData.cpp's encode() function. A pointer to this memory ('data') is passed to the class EncodedImageData. The EncodedImageData class never deletes this memory.

To fix this locally, I added a destructor to the class EncodedImageData(). The destructor deletes the array 'data'. With this change the memory no longer leaks in my testing.

Comments (1)

  1. Log in to comment