hypersurge / awe6

awe6, the inverted game framework (Haxe)
http://awe6.org
MIT License
79 stars 11 forks source link

Memory leak when switching scenes #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start awe6 demo app using nme test awe6.nmml flash|mac -debug
2. Start the game, click all Spheres, start new game, click all spheres, start 
new game ...
3. Have a look at the Memory usage

What is the expected output? What do you see instead?
Expected: disposer will remove the view and free the memory used.
Instead: 
Mac:
It starts at 48 MB, increases to 60 MB when starting the game, increases to 70 
MB when Results Scene is shown.
Then starting a new game leads to 96 MB usage, next restart is using 111 MB and 
so on.
Flash:
Starts lower at 10 MB, but also increases steadily to 14 MB on next game, then 
17 MB and so on.

What version of the product are you using? On what operating system?
Latest HXCPP, NME and awe6 (all from trunk), testing on a Mac 10.7

Original issue reported on code.google.com by tobias.r...@gmail.com on 18 Jun 2012 at 8:14

GoogleCodeExporter commented 9 years ago
Note Flash GC is not instantenous.  Memory can quite validly increase to quite 
large spikes, and then drop back when it needs to (which may never happen at 
low memory levels).  After testing Flash issue was considered invalid.

CPP issue was replicated.  However it was nothing to do with Sphere, Entitiies 
or BitmapData etc (I sequentially removed everything to isolate the problem).  
It was to do with InputManager not disposing the events registered to Stage for 
Keyboard and Mouse - i.e. a strong reference issue which is handled differently 
in nme than in Flash.  I will commit a fix immedately after this post.

Original comment by robert.f...@hypersurge.com on 18 Jun 2012 at 9:25

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r458.

Original comment by robert.f...@hypersurge.com on 18 Jun 2012 at 9:26