zechdc
zechdc

Reputation: 3404

Does AS3 have a class destructor?

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?

Upvotes: 3

Views: 8779

Answers (1)

Michael Antipin
Michael Antipin

Reputation: 3532

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() and ByteArray.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.

Upvotes: 4

Related Questions