TonUINO icon indicating copy to clipboard operation
TonUINO copied to clipboard

Possible memory leak in function readCard

Open pit-nrw opened this issue 4 years ago • 1 comments

In function readCard is a possible memory leak, caused by removing of a modifier card. When a modifier card is removed, only the activeModifier is set to null, but the memory is not freed. https://github.com/xfjx/TonUINO/blob/73b568159303285d43ff8fec8605237cddbbb49a/Tonuino.ino#L1635-L1642

Should be fixed by using: delete activeModifier;

Or the implementation of Modifier class could be changed to contain a destructor which gets called.

pit-nrw avatar Aug 05 '19 09:08 pit-nrw

What about a pull request? I'd merge it into my branch.

AlexanderWillner avatar Jan 08 '20 12:01 AlexanderWillner