EmilDohne / PhotoshopAPI

A modern and performant C++20 read/write parser of Photoshop Files (*.psd and *.psb) with fully fledged Python bindings hosted on PyPi
https://photoshopapi.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
94 stars 9 forks source link

Memory leak in ImageChannel #88

Closed EmilDohne closed 2 months ago

EmilDohne commented 2 months ago

Currently the only way to actually free the memory from an ImageChannel<T> is to call extractData() on it. This however should also be called on the destructor as otherwise we have memory just floating about after the file is written and discarded of.

Similarly in our compression function of LayerAndMaskInformation.cpp we currently call getData() while we should be calling extractData()