Cleaning up after closures in Flash
This example is an overview of various mechanisms to remove listeners to closures in Flash, thus preventing memory leaks.
Run the various closure techniques via the application using Flashbuilder's Profiler. Check the usage of the
MyTimer class (which is what we're testing). It will increase into a hundred instances (for each item) for all tests, and then after running GC manually, will decrease back to 0 instances.
Third party dependencies
Flashbuilder: Run the following maven goal to generate the project files from the pom.
IntelliJ: Use the import wizard
To build on your machine via Maven. Follow these steps:
Ensure Maven 3.0.3 + is installed
Install local dependencies (add them to your local repository)
cd libs mvn install:install-file -Dfile=as3-signals-0.8.swc -DgroupId=org.osflash -DartifactId=as3-signals -Dversion=0.8 -Dpackaging=swc
mvn clean install