Garbage collection is a noteworthy sensitive topic for developers. The garbage collection behavior of Flash Player is uncontrollable. Recently, I found that Flash Player
The system. disposexml () method is added in 10.1 and air 1.5.2. This is another method that allows developers to manually release memory (although only for XML
Object ). Currently, what I know is that APIs that can release memory are ):
- System. disposexml ()
- Bitmapdata. Dispose ()
- Loader. unloadandstop ()
- System. GC ()-this is the most powerful API, but it is only applicable to the debugging version. System. GC () is only for developers. system. GC () is limited to Flash Player debugging and AIR applications. In the air application, the system. GC () method is only enabled in the content running in the air debug launcher (ADL) or in the Application Security Sandbox of the installed application.
Disposexml () method
Public static function disposexml (node: XML): void
Language Version
: ActionScript 3.0
Runtime version
: Flash Player 10.1, air 1.5.2
Description
: Make the specified XML object available for garbage collection immediately. This method deletes the parent-level and child-level connections between all nodes of the specified XML node.
Parameters
:Node
: XML-XML reference for garbage collection.