Tracking Memory usage on iOS using the Stats class
I've been checking memory usage on an app I'm developing for iOS using the Stats class https://github.com/mrdoob/Hi-ReS-Stats ( http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c3-315cd077124319488fd-7fff.html#WS948100b6829bd5a61637f0a412623fd0543-8000).
I added the Stats class to my project and redeployed and, yikes, memory usage reported in Stats creeps up (pretty slowly) even when there's nothing happening in the app (just showing a loaded bitmap).
To try and track down the issue I created a project with a test class that extends Sprite with just this single call in the constructor :-
addChild( new Stats() );
I deployed it to the device to check that it didn't gobble any memory.
But I was Suprised to watch the memory usage creep up and up (to approx 5) before some garbage collection kicked in and takes memory back down. I left it running and then it crept up again to over 7.5 this time before being kicked back down to just below 3.
So 2 related questions that I'd appreciate any feedback/observations/thoughts on :-
1 - Is this normal (i.e. memory creeping up when there's nothing other than Stats in the project) ?
2 - What is the best way to monitor memory usage within an app ? Is Stats good enough - is Stats itself causing the memory usage ?
All the best guys !
