This content has been marked as final. Show 5 replies
In fact, by checking again and agian, I found that the class is in fact removed. The problem is about the FLVPlayback component, that is kept even if the class is removed. Using another code I found that I'm unable to remove an instance of a FLVPlayback defined in a class... Is there a way do do this?
Before removing a class you must remove every hard reference to its children first. This will add them to Flash trash and they will be sent to garbage collection by the player. It is not enough to simply delete the class.
Hi, I didn't get. You mean I must go through the instance and remove all of its properties/methods before removing it?
In fact, as I noticed, the proble isn't related to remove the class, taht now I know is corretcly removed. The problem is about the FLVPlayback component removal.
a typical class has global variables and methods and things of that nature. I'm not sure about how you built your class but I'm guessing that you put something along the lines of
before the declaration of the constructor and then initiating using new later on in your clip. These kinds of declarations are create global variables (hard references) which often have listeners etc included. The listeners and the like have to removed and null'ed out so that no hard reference still exists so that Flash will run it through garbage collection.
Besides the listeners, are there more properties/methods that I have to manually remove to destroy my flvplayback instance? It still remains on my stage after removing all the listeners associated...