View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0020085Runner[All Projects] GeneralPublic2016-01-19 14:162017-08-03 15:34
Assigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
StatusResolvedResolutionUnable to Reproduce 
PlatformOSOS Version
Summary0020085: Arrays on ds lists leak memory when replaced
DescriptionI have a rather large ds_list on this project that contains arrays representing world geometry. Whenever I take one of these out, edit it, and put it back in the same position on the list, memory is leaked. Big operations like smoothing out normals, which change all arrays in the list, leak huge amounts of memory. Eventually the game crashes.

The only way to not have a memory leak in this case is to use accessors, which I will be using from now on, but still...

To sum up, when you replace an array on a ds list, the stray array that was already there doesn't get deleted and leaks (I'm assuming). Taking a value out and reading from it isn't a problem since it doesn't get duped for that.

I did not test other data structures.
Steps To Reproduce- make a ds list
- make a large array
- add array to list
- write to array, and put it on the same position of the list
- notice memory leak the size of the array
1.4 Version1.4.1690
2.x Runtime Version
2.x Runtime Version Verified In
Attached Files? file icon arrayleak.gmz [^] (8,337 bytes) 2016-01-23 22:25

- Relationships

-  Notes
rcusumano (Updater)
2016-01-20 15:58

Additionally, setting the local var holding the array reference to 0 afterwards does not solve the problem since that one is correctly cleaned by the engine at the end of the script.
Stewart Bishop (Administrator)
2016-01-22 15:02

Is it possible for you to attach a sample to your bug report so that we can investigate it?
Daniel Cleaton (Administrator)
2016-01-22 15:04

Can we get a sample project which shows this, please?
rcusumano (Updater)
2016-01-23 22:26

Russell Kay (Manager)
2017-08-03 15:34

I suspect this has been fixed previously as I cannot reproduce it in the current version

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker