PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: jgervin on February 25, 2009, 09:28:43



Title: DisplayObject not being removed from memory getting Error #2025
Post by: jgervin on February 25, 2009, 09:28:43
So I have on my main Application page 3 components:

Graph: displaylist[0]
Menu: displaylist[1]
vslider: displaylist[2]

I am trying to create a popup (can't use popup manager because popup needs to be between Graph and Menu (see above).

So I am instantiating a component that looks like a callout on DisplayList[1] pushing everything else up. So far so good.  To create the callout you click on child objects of Graph the first time you click an object, creating a callout and its Mediator, it opens the callout. You can then close the callout, which also removes the Mediator. But when I click another node the first callout isn't deleted from memory so it tries to use that callout and that is when i get the #2025 error.

I have double checked that all references to the first callout are deleted or removed. Still I get the error?

Any suggestions?

TIA, J


Title: Re: DisplayObject not being removed from memory getting Error #2025
Post by: puremvc on February 26, 2009, 06:15:58
How do you remove the mediator for callout?

I'm imagining that inside the mediator for the callout you set an event listener on the callout to hear when it is removed from the stage and this is what causes its mediator to remove itself? Does the mediator also remove all event listeners it placed on the callout, null its reference to it before removing itself?

-=Cliff>