Return to Starling Playback Library
Memory leak in GAF
16 posts
• Page 2 of 2 • 1, 2
Re: Memory leak in GAF
The problem was with CSF=2. Now it's fixed. Thanks for the demo!
Yes, when you load GAF from the file system GAF library doesn't save PNG in the memory. So memory usage in this case will be lower.
According to your post, for Mobile, I can use file system to restore texture atlases instead ByteArray (file zip), is memory when use file system lower than memory when use ByteArray ??
Yes, when you load GAF from the file system GAF library doesn't save PNG in the memory. So memory usage in this case will be lower.
-
vadym.mitin - Posts: 254
- Joined: December 4th, 2013, 8:00 am
Re: Memory leak in GAF
Hi, everything on web is OK, but on mobile, if I use file system to restore texture atlases, it has a error "[Fault] exception, information=Error: No GAF animation files found". Can you explain to me about this problem and what must I do to avoid this, thank 
This is my demo
http://www.mediafire.com/download/6s262 ... Mobile.rar

This is my demo
http://www.mediafire.com/download/6s262 ... Mobile.rar
-
Lê Huy Hùng - Posts: 61
- Joined: July 3rd, 2015, 8:32 pm
Re: Memory leak in GAF
Don't use ZIP in mobile application. It's useless. Instead of this keep all GAF sources in folders.
Use path to *.gaf config file:
Or use path to a folder with *.gaf config file/files and *.png texture atlases
See the "data" parameter description in API Reference https://gafmedia.com/docs/starling/trun ... vert%28%29
Use path to *.gaf config file:
- Code: Select all
var gafAssetFile: File = File.applicationStorageDirectory.resolvePath("assets/animation1/animation1.gaf");
var converter: ZipToGAFAssetConverter = new ZipToGAFAssetConverter();
converter.addEventListener(Event.COMPLETE, this.onConverted);
converter.convert(gafAssetFile);
Or use path to a folder with *.gaf config file/files and *.png texture atlases
- Code: Select all
var gafAssetFile: File = File.applicationStorageDirectory.resolvePath("assets/animation1/");
var converter: ZipToGAFAssetConverter = new ZipToGAFAssetConverter();
converter.addEventListener(Event.COMPLETE, this.onConverted);
converter.convert(gafAssetFile);
See the "data" parameter description in API Reference https://gafmedia.com/docs/starling/trun ... vert%28%29
-
vadym.mitin - Posts: 254
- Joined: December 4th, 2013, 8:00 am
Re: Memory leak in GAF
Thank, i tried and succeeded. However, according me, work flow (load asset) has a bit complex if i want write a game in both web and mobile (one project in both web and mobile). In web, i use zip and in mobile, i want use gaf config file. Do you any advice for me, thank again 

-
Lê Huy Hùng - Posts: 61
- Joined: July 3rd, 2015, 8:32 pm
Re: Memory leak in GAF
I'm not sure that this is exactly that you want but maybe this help you:
http://www.flashdevelop.org/wikidocs/in ... ompilation
http://help.adobe.com/en_US/flex/using/ ... -7abd.html
Using AS3 Conditional Compilation you can write separate logic for WEB and for AIR/Mobile. Hope this is exactly what you need.
http://www.flashdevelop.org/wikidocs/in ... ompilation
http://help.adobe.com/en_US/flex/using/ ... -7abd.html
Using AS3 Conditional Compilation you can write separate logic for WEB and for AIR/Mobile. Hope this is exactly what you need.
-
vadym.mitin - Posts: 254
- Joined: December 4th, 2013, 8:00 am
Re: Memory leak in GAF
Hi, i completed load asset on both Web and Mobile. On Web, i load zip as normally, on Mobile, I check version asset, if asset is new and need load, i load zip and save it on Local Storage, then pass File to GAF, if asset exist, simply i pass File to GAF directly. Finnaly, it work 

-
Lê Huy Hùng - Posts: 61
- Joined: July 3rd, 2015, 8:32 pm
16 posts
• Page 2 of 2 • 1, 2
Return to Starling Playback Library
Who is online
Users browsing this forum: No registered users and 1 guest