Reputation: 1942
Generally when you unload an swf from another swf you would follow a cleanup utilzing removed from stage or unload events.
But when you exit an as3 flash application by either navigating away from page or reloading the page or closing/removing the application. what is the best practices you would follow to ensure proper cleanup and garbage collection.
Question : what methods in solely as3 code can be used in this regard.
It may be argued that once an swf is unloaded or removed its memory foot print can be verified to have decreased eg via the task manager Is this a good enough measure?
Or is it advisable to handle the unloading/exiting in a proper manner ?
Upvotes: 2
Views: 293
Reputation: 90756
You don't need to do anything about this. When you close the browser tab, the Flash instance is going to be destroyed so the memory will be completely released. And if there's any memory leak, it's a problem with the Flash plugin/ActiveX, not your application.
Upvotes: 5