Look for change 4684 in Subversion (3.3 branch)

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of flexcoder99
Sent: Thursday, March 26, 2009 8:21 AM
To: [email protected]
Subject: [flexcoders] Re: ItemEditors Memory Leak


Appreciate your prompt responses.

We are using Flex SDK 3.0
Which version was the fix put in?
Last time I tried to change to 3.3 there were many runtime exceptions in our 
application which did not happrn with 3.0. ecause it needed extensive testing 
to uncover all the RTEs and we did not have enough time to do that, we reverted 
back to 3.0.

If you tell me the file(s) that has the fix...I can monkey patch it in to our 
app.


--- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex 
Harui <aha...@...> wrote:
>
> Which version of Flex are you using? I think we fixed a focusrect issue 
> recently.
>
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
>
> From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On 
> Behalf Of flexcoder99
> Sent: Wednesday, March 25, 2009 4:23 PM
> To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] Re: ItemEditors Memory Leak
>
>
> All are circular EXCEPT the reference held by DataGrid.
> This in turn has 59 references ...so after spending long time could not find 
> the culprit yet.
>
> Made some INTERESTING observations:
> The problem happens only if the editor is TextInput, but does not happen with 
> CheckBoxEditor and ComboBoxEditors.
>
> My TextInputEditor is subclass of TextInput and implements IFactory.
>
> As you said, I looked at the references of itemEditor itself.
>
> All are circular except HaloFocusRect and UITextField.
> There are lot of circular references held by Functions like 'keyUpHandler', 
> 'keyDownHandler', 'focusInHandler', 'focusOutHandler', 'removedHandler', 
> 'addedHandler', 'changeHandler' etc.
>
> --- In 
> [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
>  Alex Harui <aharui@> wrote:
> >
> > The next step is to chase all 9 references to see if they are circular 
> > (eventually end up back at Panel_A). I'd next check the itemEditor itself 
> > to make sure nobody is referencing it.
> >
> > When the player hangs on to something, if you put focus somewhere else and 
> > start typing, it should release that thing it was holding onto.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: 
> > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> >  
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> >  On Behalf Of flexcoder99
> > Sent: Wednesday, March 25, 2009 11:53 AM
> > To: 
> > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Re: ItemEditors Memory Leak
> >
> >
> > After running GC there are 9 references to Panel_A:
> >
> > 1> mx.binding:Binding
> > 2> mx.core.UIComponentDescriptor
> > 3> Function
> > 4> Panel_A (circular reference)
> > 5> mx.core.UIComponentDescriptor
> > 6> mx.containers.utilityClasses.BoxLayout
> > 7> Function
> > 8> Function
> > 9> mx.core.ContainerRawChildrenList
> >
> > Your point about "player can hang onto last focused thing" makes sense 
> > because I see similar behaviour with pop-ups too.
> >
> > As soon as I type in TextInput field in the pop-up, pop-up is not GCd after 
> > closing.
> >
> > --- In 
> > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> >  Alex Harui <aharui@> wrote:
> > >
> > > What does the profiler show? Sometimes the player can hang onto last 
> > > focused thing.
> > >
> > > Alex Harui
> > > Flex SDK Developer
> > > Adobe Systems Inc.<http://www.adobe.com/>
> > > Blog: http://blogs.adobe.com/aharui
> > >
> > > From: 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > >  
> > > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> > >  On Behalf Of flexcoder99
> > > Sent: Wednesday, March 25, 2009 9:19 AM
> > > To: 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] Re: ItemEditors Memory Leak
> > >
> > >
> > > I tried that. No change.
> > >
> > > One other obervation:
> > > no matter how many times I repeat this test case:
> > >
> > > "going to panel_A -> adding a row to DataGrid -> editing a cell -> goto 
> > > Panel_B -> run GC"
> > >
> > > there is only one instance of Panel_A and its DataGrid in LiveObjects 
> > > view. Instance count did not increase each time.
> > >
> > > --- In 
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > >  Alex Harui <aharui@> wrote:
> > > >
> > > > Set focus somewhere else. Use the profiler to see what else is hanging 
> > > > on
> > > >
> > > > Alex Harui
> > > > Flex SDK Developer
> > > > Adobe Systems Inc.<http://www.adobe.com/>
> > > > Blog: http://blogs.adobe.com/aharui
> > > >
> > > > From: 
> > > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > >  
> > > > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> > > >  On Behalf Of flexcoder99
> > > > Sent: Tuesday, March 24, 2009 11:12 AM
> > > > To: 
> > > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > > Subject: [flexcoders] ItemEditors Memory Leak
> > > >
> > > >
> > > > I have two panels Panel_A and Panel_B (using tree control to navigate).
> > > > Both these panels have DataGrid in them.
> > > > DataGrid has a "Add row" context menu.
> > > >
> > > > Scenario WITHOUT Memory leak:
> > > > Go to Panel_A
> > > > Add an empty row to the grid
> > > > Go to Panel_B
> > > > Run GC.....Panel_A and its grid are GCd
> > > >
> > > > Scenario WITH Memory leak:
> > > > Go to Panel_A
> > > > Add an empty row to the grid
> > > > Edit a cell
> > > > Go to Panel_B
> > > > Run GC.....Panel_A and its grid are NOT GCd
> > > >
> > > > This led me to think that ItemEditors are causing memory leak.
> > > > Any ideas on how I can avoid this ?
> > > >
> > >
> >
>

Reply via email to