My question is as simple as the title, yet googling it didn’t give me a simple yes/no answer.
Does AS3 have a class destructor?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In short: no, it doesn’t. Flash Player virtual machine uses garbage collector concept. You don’t have direct control over memory used by objects (except for rare cases like
BitmapData.dispose()andByteArray.clear()), but you are to do some work to make garbage collecting possible. And there is no way you can have something triggered automatically when an object dies.Follow the links to learn more about GC logics.