RE: [flexcoders] Profiler telling lies?
Again, only just got to this... The same action another two times was from following the advice in here http://livedocs.adobe.com/flex/3/html/help.html?content=profiler_7.html# 207205 and of course I meant another 3 times ;) I did find the issue eventually, though it was painful. You were right when you asserted that the [child0] backreference was a red herring, it was the view's parent that was still being held onto, and that was due to creating a Menu in a click handler. Just in case anyone else ever runs up against a similar issue, taskMenu = Menu.createMenu(this, new TaskMenuConfig( ).CONFIG_ARRAY, true); will pin the UI (I'm still unsure exactly why, when I get 5 minutes, I'll look into it), however taskMenu = Menu.createMenu(DisplayObjectContainer(Application.application), new TaskMenuConfig( ).CONFIG_ARRAY, true); will leave the UI to be garbage collected. So, no the profiler wasn't telling lies! Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: 07 May 2009 07:24 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Profiler telling lies? Hmm, not sure I understood everything you're doing. What is the same action another two times? When you say the line with the instance being the viewstack object, if that is a loitering object and [child0] is the backreference, then that should mean that the viewstack is still parented and so the issue is not with the viewstack's children. Alex Harui Flex SDK Developer
RE: [flexcoders] Profiler telling lies?
Hmm, not sure I understood everything you're doing. What is the same action another two times? When you say the line with the instance being the viewstack object, if that is a loitering object and [child0] is the backreference, then that should mean that the viewstack is still parented and so the issue is not with the viewstack's children. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Gregor Kiddie Sent: Wednesday, May 06, 2009 3:35 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Profiler telling lies? Yeah, ok some clarification (rather than bashing the email out then going home for the night ;) ) I'm debugging and watching the numChildren properties and the selectedChild properties. (The object extends viewstack btw). I can see the view in the viewstack, then after running though the code that removes the child from the viewstack, I can see the numChildren has dropped from 1 to 0, and the selectedChild (and selectedIndex) both are consistent with having no child in the viewstack. In terms of profiling... I am starting up the app, getting the view created, and running the code once to clean up. Then I take a memory snapshot. I do the same action another two times (to get to the prime). Then I take another snapshot. Then I work out the loitering objects. The line with the instance being the viewstack object and the property being [child0] is what makes me think it still has a reference to the view and the reason (or one of them ;) )why it isn't being garbage collected... And Alex, I think I've read everything on your blog at least 8 times ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: 05 May 2009 17:57 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Profiler telling lies? First, make sure you are using the right view. If you are looking at loitering objects but your scenario should not be using that view, you will get false positives. I've explained why on my blog. If you're looking at a memory snapshot, I would dig further as I haven't seen the profiler 'lie' in this situation yet. Remember that Flex containers are IRawChildrenContainers. There is no children array, and numChildren does not count borders and other chrome. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mark Doberenz Sent: Tuesday, May 05, 2009 8:04 AM To: flexcoders@yahoogroups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Profiler telling lies? Check your event listeners because if you're not using weak references then the garbage collector won't remove it. Disregard if you already knew that one :) On May 5, 2009, at 7:58 AM, Gregor Kiddie gkid...@inpses.co.ukmailto:gkid...@inpses.co.uk wrote: Hi all, I'm trying to work out where a memory leak is occurring in our application (putting me into Jeff's hell from last week). When profiling the app, it claims there is still a back reference to its parent on the display list (even though I remove it!) at [child0]. When I debug the application, the child is removed as I'd expected, and the children array is empty. So which one is lying? The profiler when it tells me there is still a back reference to the parent as [child0] or the debugger when it tells me the child has been removed... Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk mlmsg #ygrp-msg p a span.yshortcuts { font-family
RE: [flexcoders] Profiler telling lies?
Yeah, we went on that particular sweep ages ago... Developers now get beatings if they don't use weak listeners ;) Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mark Doberenz Sent: 05 May 2009 16:04 To: flexcoders@yahoogroups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Profiler telling lies? Check your event listeners because if you're not using weak references then the garbage collector won't remove it. Disregard if you already knew that one :)
RE: [flexcoders] Profiler telling lies?
Yeah, ok some clarification (rather than bashing the email out then going home for the night ;) ) I'm debugging and watching the numChildren properties and the selectedChild properties. (The object extends viewstack btw). I can see the view in the viewstack, then after running though the code that removes the child from the viewstack, I can see the numChildren has dropped from 1 to 0, and the selectedChild (and selectedIndex) both are consistent with having no child in the viewstack. In terms of profiling... I am starting up the app, getting the view created, and running the code once to clean up. Then I take a memory snapshot. I do the same action another two times (to get to the prime). Then I take another snapshot. Then I work out the loitering objects. The line with the instance being the viewstack object and the property being [child0] is what makes me think it still has a reference to the view and the reason (or one of them ;) )why it isn't being garbage collected... And Alex, I think I've read everything on your blog at least 8 times ;) Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: 05 May 2009 17:57 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Profiler telling lies? First, make sure you are using the right view. If you are looking at loitering objects but your scenario should not be using that view, you will get false positives. I've explained why on my blog. If you're looking at a memory snapshot, I would dig further as I haven't seen the profiler 'lie' in this situation yet. Remember that Flex containers are IRawChildrenContainers. There is no children array, and numChildren does not count borders and other chrome. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mark Doberenz Sent: Tuesday, May 05, 2009 8:04 AM To: flexcoders@yahoogroups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Profiler telling lies? Check your event listeners because if you're not using weak references then the garbage collector won't remove it. Disregard if you already knew that one :) On May 5, 2009, at 7:58 AM, Gregor Kiddie gkid...@inpses.co.uk mailto:gkid...@inpses.co.uk wrote: Hi all, I'm trying to work out where a memory leak is occurring in our application (putting me into Jeff's hell from last week). When profiling the app, it claims there is still a back reference to its parent on the display list (even though I remove it!) at [child0]. When I debug the application, the child is removed as I'd expected, and the children array is empty. So which one is lying? The profiler when it tells me there is still a back reference to the parent as [child0] or the debugger when it tells me the child has been removed... Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk mlmsg #ygrp-msg p a span.yshortcuts { font-family: Verdana; font-size: 10px; font-weight: normal; } #ygrp-msg p a { font-family: Verdana; font-size: 10px; } #ygrp-mlmsg a { color: #1E66AE; } div.attach-table div div a { text-decoration: none; } div.attach-table { width: 400px; } --
[flexcoders] Profiler telling lies?
Hi all, I'm trying to work out where a memory leak is occurring in our application (putting me into Jeff's hell from last week). When profiling the app, it claims there is still a back reference to its parent on the display list (even though I remove it!) at [child0]. When I debug the application, the child is removed as I'd expected, and the children array is empty. So which one is lying? The profiler when it tells me there is still a back reference to the parent as [child0] or the debugger when it tells me the child has been removed... Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk
Re: [flexcoders] Profiler telling lies?
Check your event listeners because if you're not using weak references then the garbage collector won't remove it. Disregard if you already knew that one :) On May 5, 2009, at 7:58 AM, Gregor Kiddie gkid...@inpses.co.uk wrote: Hi all, I’m trying to work out where a memory leak is occurring in our appli cation (putting me into Jeff’s hell from last week). When profiling the app, it claims there is still a back reference to its parent on the display list (even though I remove it!) at [child0]. When I debug the application, the child is removed as I’d expected, and the children array is empty. So which one is lying? The profiler when it tells me there is still a back reference to the parent as [child0] or the debugger when it tells me the child has been removed… Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk mlmsg #ygrp-msg p a span.yshortcuts { font-family: Verdana; font- size: 10px; font-weight: normal; } #ygrp-msg p a { font-family: Verdana; font-size: 10px; } #ygrp-mlmsg a { color: #1E66AE; } div.attach-table div div a { text-decoration: none; } div.attach- table { width: 400px; } --
RE: [flexcoders] Profiler telling lies?
First, make sure you are using the right view. If you are looking at loitering objects but your scenario should not be using that view, you will get false positives. I’ve explained why on my blog. If you’re looking at a memory snapshot, I would dig further as I haven’t seen the profiler ‘lie’ in this situation yet. Remember that Flex containers are IRawChildrenContainers. There is no “children” array, and numChildren does not count borders and other chrome. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mark Doberenz Sent: Tuesday, May 05, 2009 8:04 AM To: flexcoders@yahoogroups.com Cc: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Profiler telling lies? Check your event listeners because if you're not using weak references then the garbage collector won't remove it. Disregard if you already knew that one :) On May 5, 2009, at 7:58 AM, Gregor Kiddie gkid...@inpses.co.ukmailto:gkid...@inpses.co.uk wrote: Hi all, I’m trying to work out where a memory leak is occurring in our application (putting me into Jeff’s hell from last week). When profiling the app, it claims there is still a back reference to its parent on the display list (even though I remove it!) at [child0]. When I debug the application, the child is removed as I’d expected, and the children array is empty. So which one is lying? The profiler when it tells me there is still a back reference to the parent as [child0] or the debugger when it tells me the child has been removed… Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.ukblocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk mlmsg #ygrp-msg p a span.yshortcuts { font-family: Verdana; font-size: 10px; font-weight: normal; } #ygrp-msg p a { font-family: Verdana; font-size: 10px; } #ygrp-mlmsg a { color: #1E66AE; } div.attach-table div div a { text-decoration: none; } div.attach-table { width: 400px; } --