AM2R-Community-Developers / AM2R-Community-Updates

Source code for AM2R 1.5.2+, free of copyrighted assets and trademarks.
https://www.reddit.com/r/AM2R/
Other
139 stars 27 forks source link

Possible memory leak: majority of `ds_list`s are not destroyed #126

Open Jesright73 opened 11 months ago

Jesright73 commented 11 months ago

In nearly every script with var list = ds_list_create(), there is no call to destroy it. Instead, they end in either ds_list_clear(list) or ds_list_empty(list). Being a local variable, list receives a new id every time it is declared; thusly, every ds_list assigned to it (that is not destroyed at the end of the script), is kept in memory forever (until the game closes). This could be a contributor to a small portion of the memory leaks.