I have an large Flex application using BlazeDS and Cairngorm.  I am
running it through the Flex 3 Profiler to examine memory leaks and am
having trouble analyzing the output and was hoping someone could give
me some pointers.

I have some repeatable steps which basically -

1) queries through BlazeDS for a list of objects
2) assigns result into my model locator
3) datagrid gets populated through binding
-take snapshot
-16 MyObjectVO objects
4) click to other parts of the UI, return to list page which re-queries
-profiler shows 32 MyObjectVO objects
-take snapshot, gc runs
-16 MyObjectVO objects (looks good, # of objects not growing)
4) click on link which sets model variable to null. In addition, I set
the data and dataprovider attributes of the datagrid to null.
-take snapshot
-16 MyObjectVO objects still exist ???

Looking at the Object References for the MyObjectVOs, I found that
there were quite a few references.  One was from the RemoteObject call
which I was able to remove by using clearResult.

However, I am left with references such as -

my.package.MyObjectVO(4)
+mx.controls.dataGridClasses.DataGridItemRenderer(6)  property
mx.controls.dataGridClasses.DataGridItemRender:_data
+mx.controls.dataGridClasses.DataGridItemRenderer(6)  property
mx.controls.dataGridClasses.DataGridItemRender:_data
+mx.controls.dataGridClasses.DataGridItemRenderer(6)  property
mx.controls.dataGridClasses.DataGridItemRender:_data
+flash.utils.Dictionary(1)  property [key21]

Please note that the datagrid looks like -

<mx:columns>
  <mx:DataGridColumn headerText="col1" dataField="name"
showDataTips="true" dataTipField="name"/>
  <mx:DataGridColumn headerText="col2" dataField="version"/>
  <mx:DataGridColumn headerText="col3" dataField="language"/>
</mx:columns>

With each of the dataFields being a String attribute on MyObjectVO. 
No custom item renderers.

I tried calling removeChild to remove the datagrid to see if that
would help but it doesn't seem to.

Can anyone give me pointers as to why the objects are still being
referenced?

Thanks.

Reply via email to