I can see a similar problem here -
http://mate.asfusion.com/forums/topic.php?id=121

as iconara says,

"PopUpManager.removePopUp removes popups in a clean way, but if that
popup is referenced by something that is still around, for example
objects that the popup listens for events on, like the stage. Unless
you cleanly remove all such listeners you have a memory leak."


-Saurabh
http://blog.saurabhnarula.com/


On Tue, Nov 23, 2010 at 2:35 PM, Dinesh Reddy Rekula <rdr1...@gmail.com> wrote:
>
> Hi Saurabh,
>
>
> Code spread across several files. Can't send the complete code.
>
>
> Actually i was modifying the some existing code.  I am completely removing 
> the popup using Popupmanager.RemovePopup(Popupobject);
>
> I have identified the problem also. The problem is, once we close the popup, 
> all event handlers should be unregistered. But here in this case, it's not 
> unregistering Event handlers declared using <mate:Listener/>. The other event 
> handlers are unregistering once we remove the popup.
>
> i didn't try with ListenerInjector. i will try that.
>
> Thanks,
> Dinesh
>
>
>
> On Tue, Nov 23, 2010 at 2:14 PM, Saurabh Narula 
> <reachsaurabhnar...@gmail.com> wrote:
>>
>> Dinesh,
>> Can you include the complete code, i want to see how are you removing the 
>> popup, is it a complete removal or a hide?
>> Also, always consider removing eventlistener as a prerequisite to writing 
>> good code.
>> why are you writing  receive="{onUpdateResults(event)}" within the curly 
>> braces, shouidnt it just be receive="onUpdateResults(event)"?
>> Also, I can see on the mate documentation that Listener tag has 
>> been deprecated, and you should use ListenerInjector instead, did you tried 
>> this?
>>
>> Thank you,
>> Saurabh
>>
>>
>> On Tue, Nov 23, 2010 at 12:29 PM, Dinesh Reddy Rekula <rdr1...@gmail.com> 
>> wrote:
>>>
>>> In one of my forms, I have used the following code for adding Mate Listeners
>>>
>>> <mate:Listener type="{DBEvent.Update_Result}" 
>>> receive="{onUpdateResults(event)}"/>
>>>
>>> I am displaying this form as a popup. What happening is, for the first 
>>> time, onUpdateResults method executed only once as expected. Then i close 
>>> the popup and reopened it. This time onUpdateResults method called twice, 
>>> then next 4time and so on...
>>>
>>> After so much of googling, i found that Mate Listeners are still active, 
>>> even though we remove/close the popup. I tried weak references, close the 
>>> popup using PopupManager.RemovePopup and so on. Nothing worked.
>>>
>>> Then i thought of registering and unregistering the mate listeners manually 
>>> using action script. So, i have tried the following code
>>>
>>> var _listener:Listener= new Listener();
>>>
>>> _listener.addEventListener(DBEvent.Update_Result,onUpdateResults);
>>>
>>> to unregister...
>>>
>>> _listener.removeEventListener(DBEvent.Update_Result,onUpdateResults);
>>>
>>> But this is also not working.
>>>
>>> Please somebody help me fix this issue.
>>>
>>> Thanks,
>>>
>>> Dinesh
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Flex India Community" group.
>>> To post to this group, send email to flex_in...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> flex_india+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/flex_india?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Flex India Community" group.
>> To post to this group, send email to flex_in...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> flex_india+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/flex_india?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Flex India Community" group.
> To post to this group, send email to flex_in...@googlegroups.com.
> To unsubscribe from this group, send email to 
> flex_india+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/flex_india?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_in...@googlegroups.com.
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to