RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -
You can't really blow things away in AS3 (or Java). You kill all references to them and they go away when garbage collected. If you are listening to the app model, it means the app model has a reference to the event listener and thus it won't go away. Use weak references or clean up when removed from the display list. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Sunday, June 03, 2007 11:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - Hello All, I have a WEIRD problem, and I am hoping you can all shed some light on this. I have a Popup TitleWindow which serves the purpose of displaying details from a Master Grid. Among all the other controls housed within the TitleWindow, I am using the ObserveValue Component, which monitors a Boolean Value residing in my ApplicationModel. Once the user is finished looking at the Details, they must close the Window. I am using the PopUpManager.removePopUp() method of closing the TitleWindow, which should in essence, blow away the TitleWindow itself, in addition to all the Controls that reside within it. Even know the TitleWindow gets closed, I am still getting Trace Messages outputted to my custom Debug Window (which demonstrates the fact, that my ObserveValue Component is still active functioning). A quick note, I am tracing the output so that I can monitor my variables during development of my app. How is this possible?? I must get to the bottom of this ASAP, as this is causing some problems with the rest of my application. Thanks in advance for any help you can throw my way. Mike
RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -
Okay, that helps explain things a tad - If this was yourself in this predicament, how would you go about handling this problem? I am just curious how I can force a Garbage Collection to take place, in order to remove this component from memory (and more important, to make it stop responding to my model changes - as this is happening on a very regular basis) Also, what would be the proper way to create a weak reference to my ApplicationModel, so that the corresponding resources get released, whenever the TitleWindow container gets blown away? Thanks in advance for your help - this is a topic that I've been needing to dive into for quite some time, and this would be a perfect opportunity to address everything. Mike From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Monday, June 04, 2007 12:29 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - You can't really blow things away in AS3 (or Java). You kill all references to them and they go away when garbage collected. If you are listening to the app model, it means the app model has a reference to the event listener and thus it won't go away. Use weak references or clean up when removed from the display list. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson Sent: Sunday, June 03, 2007 11:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - Hello All, I have a WEIRD problem, and I am hoping you can all shed some light on this. I have a Popup TitleWindow which serves the purpose of displaying details from a Master Grid. Among all the other controls housed within the TitleWindow, I am using the ObserveValue Component, which monitors a Boolean Value residing in my ApplicationModel. Once the user is finished looking at the Details, they must close the Window. I am using the PopUpManager.removePopUp() method of closing the TitleWindow, which should in essence, blow away the TitleWindow itself, in addition to all the Controls that reside within it. Even know the TitleWindow gets closed, I am still getting Trace Messages outputted to my custom Debug Window (which demonstrates the fact, that my ObserveValue Component is still active functioning). A quick note, I am tracing the output so that I can monitor my variables during development of my app. How is this possible?? I must get to the bottom of this ASAP, as this is causing some problems with the rest of my application. Thanks in advance for any help you can throw my way. Mike
Re: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted -
Hi Alex, I'm interested as well in the solution. My application have multiple window and I notice the problem with the observer tag, so I changed to ChangeWatcher that works better, but still notice the window is not removed from memory. Maybe the problem are the bindings to the model, but...how to clear bindings created in MXML with {} notation? Any light on this would be very appreciated Thanks in advance. C. 2007/6/4, Mike Anderson [EMAIL PROTECTED]: Okay, that helps explain things a tad - If this was yourself in this predicament, how would you go about handling this problem? I am just curious how I can force a Garbage Collection to take place, in order to remove this component from memory (and more important, to make it stop responding to my model changes - as this is happening on a very regular basis) Also, what would be the proper way to create a weak reference to my ApplicationModel, so that the corresponding resources get released, whenever the TitleWindow container gets blown away? Thanks in advance for your help - this is a topic that I've been needing to dive into for quite some time, and this would be a perfect opportunity to address everything. Mike -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alex Harui *Sent:* Monday, June 04, 2007 12:29 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - You can't really blow things away in AS3 (or Java). You kill all references to them and they go away when garbage collected. If you are listening to the app model, it means the app model has a reference to the event listener and thus it won't go away. Use weak references or clean up when removed from the display list. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Mike Anderson *Sent:* Sunday, June 03, 2007 11:32 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Flex Component still active, even know TitleWindow it resides in, is deleted - Hello All, I have a WEIRD problem, and I am hoping you can all shed some light on this. I have a Popup TitleWindow which serves the purpose of displaying details from a Master Grid. Among all the other controls housed within the TitleWindow, I am using the ObserveValue Component, which monitors a Boolean Value residing in my ApplicationModel. Once the user is finished looking at the Details, they must close the Window. I am using the PopUpManager.removePopUp() method of closing the TitleWindow, which should in essence, blow away the TitleWindow itself, in addition to all the Controls that reside within it. Even know the TitleWindow gets closed, I am still getting Trace Messages outputted to my custom Debug Window (which demonstrates the fact, that my ObserveValue Component is still active functioning). A quick note, I am tracing the output so that I can monitor my variables during development of my app. How is this possible?? I must get to the bottom of this ASAP, as this is causing some problems with the rest of my application. Thanks in advance for any help you can throw my way. Mike -- ::| Carlos Rovira ::| http://www.carlosrovira.com ::| http://www.madeinflex.com