TonUINO
TonUINO copied to clipboard
Possible memory leak in function readCard
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.
What about a pull request? I'd merge it into my branch.