as i currently understand, if an event listener is added to an object with useWeakReference set to true, then it is eligible for garbage collection and will be removed if and when the garbage collection does a sweep.
public function myCustomSpriteClass() //constructor
{
this.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, mouseUpListener, false, 0, true);
}
in this case, is it not appropriate to initialize an object with weak references event listeners, incase the garbage collector does activate a sweep removing the objects event listeners since they were added during initialization of the object?
in this case, would it only be appropriate to create a type of deallocate() method which removes the event listeners before the object is nullified?