简体   繁体   中英

as3 flash application cleanup on unload from browser

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM