PDA

View Full Version : Class Destructor?


thenewa2x
11-12-2005, 05:20 PM
Some of you may know that PHP allows you to create a class destructor that is automatically called upon script exit.

My question is: Does ActionScript 2.0 have such a thing?

All of the destructors that popped up in Google were ones you would have to call manually. Any ideas?

Ruben
11-12-2005, 10:09 PM
I'm not sure about this but I don't think AS2.0 has class destructors/deconstructors

- Ruben

senocular
11-14-2005, 11:01 AM
AS does not have them... not exactly. If you make one, you would need to call them manually. In terms of MovieClip subclasses, you can just override removeMovieClip since that is probably what you would use to destroy the instance anyway.