depende de cómo usted los utiliza.
En primer lugar Identificación sugiero que obtener un mejor conocimiento de programación orientada a objetos en general.
A continuación, lea acerca de la programación orientada a objetos de ActionScript.
En su caso, usted debe hacer algo parecido a la vieja escuela c + +,
la creación de una función destructor en sus clases, que se restablecerá la mayoría de las variables, y lo llaman de la otra clase, antes de retirarlo.
Algo así como:
// in ClassCaller you add
public function Destructor()
{
timerClass.Destructor();
timerClass = null;
// any other code in here
}
// in TimerClass
public function Destructor()
{
myTimer.stop();
myTimer = null;
// any other code
}
// before removing the class ... which i suppose you just set it to null because as far as i`m aware, there's no such thing as removing a class ... a child yes, but not a class object
classCaller.Destructor();
classCaller = null;
- // in ClassCaller you add
- public function Destructor()
- {
- timerClass.Destructor();
- timerClass = null;
- // any other code in here
- }
- // in TimerClass
- public function Destructor()
- {
- myTimer.stop();
- myTimer = null;
- // any other code
- }
- // before removing the class ... which i suppose you just set it to null because as far as i`m aware, there's no such thing as removing a class ... a child yes, but not a class object
- classCaller.Destructor();
- classCaller = null;
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”