How do I unload byteArray with ActionScript3?
private var gcCount:int;
private function startGCCycle():void{
gcCount = 0;
addEventListener(Event.ENTER_FRAME, doGC);
}
private function doGC(evt:Event):void{
flash.system.System.gc();
if(++gcCount > 1){
removeEventListener(Event.ENTER_FRAME, doGC);
setTimeout(lastGC, 40);
}
}
private function lastGC():void{
flash.system.System.gc();
}
Tags: apache-flex arrays actionscript-3
Source: By as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 4.0
Related code-snippets:
- SQLStatement.execute() - multiple queries in one statement.
- How do I generate a tag cloud from an array using h1 through h6 for sizing?
- Redefining an attribute in Python with an index in array of objects using 'in'. If no object is found in an array of objects then it is not correct.
- How do you get the current logged in user in Adobe air from a desktop app?
- Is there any way to test flex application with a build script?
- Can you iterate through arrays in a classic asp vbscript?
- How can you use a SQLite database at the same time?
- Why can't I force either array ref or scalar to be array in Perl?
- Actionscript 3 - Fastest way to parse yyyy-mm-dd hh:mm:ss to a Date object?
- Adobe Flex component events are created by elements of Adobe Flex events.
- Open local file with AIR Flex.
- How can I delete multiple describetype entries in my database?
- How do I add non-dynamic actionscript 3 classes without inheriting the classes?
- How do I remove duplicates from a Perl application?
- What are some of the best ways to print flex components in FireFox3?