Hi there,
I’m having trouble getting rid of this memory leak and it seems like Im killing these terrains completely but perhaps I may not be.
I switch between 2 scenes one has one terrain, the second has 3 terrains.
Every time I switch scenes the “jme terrain thread” remains and adds threads consistently.
This is definitely the cause of my memory leak.
On pc the memory is negligible about 3mb per scene switch 60 mb if you die 20 times or beat the whole game without closing.
But unfortunately on Android, it lowers performance until out of memory crash
Is this due to me not dereferencing properly and the terrain not being garbage collected?
Or is this something that is seperate?
Also can I force destroy these terrains somehow if it is a dereference problem?
Ive written a simple test case (the models I load are the ones in my game the terrains are made in the terrain editor)
http://hastebin.com/ekogucivim.avrasm
Here is an image of the results. As you can see many threads run but are not removed even when setting the Node containing the terrain to null
As well as detaching all children from the rootNode