molovol / MoloVol

MoloVol is a free, cross-plattform, scientific software for volume and surface computations of single molecules and crystallographic unit cells.
https://molovol.com
MIT License
22 stars 4 forks source link

Fix Memory leaks #80

Closed jmaglic closed 3 years ago

jmaglic commented 3 years ago

This branch mostly fixes previous memory leak issues. The memory leaks that were identified, came from the AtomNode and AtomTree classes, because they were missing suitable destructors. Destructors were added and the code was slightly restructured to avoid early calls to the destructor. Test have shown no more memory leaks.

Apart from this private and static members in many classes were renamed to be in line with style guidelines. Smaller changes have also been added, most importantly the behaviour of the atom list grid in the GUI has been changed: when the tick box for including an element is reticked, after being ticked previously, the cell colour no longer changes to white but to the wxWidgets default. This change is necessary for correct display under macOS dark mode.

Resolves: #53