phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

no dispose functions are used, memory leakage is likely #51

Closed jbphet closed 6 years ago

jbphet commented 7 years ago

I just scanned the source code to find all the dispose functions so I could see if they were calling dispose in their supertypes, since this issue has been raised lately. I was surprised to see that there aren't any dispose functions at all in the source code. This means that it's very likely that there are memory leaks. I tried to do some profiling, but ran into problems getting multiple heap snapshots due to the very large amount of memory being used by the sim (see #50). So, we need to profile for memory leaks and add dispose functions, but we probably need to address #50 first.

jbphet commented 7 years ago

For reference, here's the comment about making sure that dispose functions call the dispose method in the supertype: https://github.com/phetsims/scenery/issues/601#issuecomment-278998421

jbphet commented 6 years ago

I checked through the code, and 13 dispose functions now exist, and they all invoke the dispose function in their super type where it makes sense to do so. I'm going to close this issue, and profile and test for memory leaks in a different one.