Hi there,

We had a similar problem albeit with the AdvancedDataGrid...it wouldn't release the custom renderers even after we told it to...in the end, we had to write a custom script that would track our renderers and when we wanted to GC things, we had to call the script to release the renderers. Additionally, a removeAll didn't seem to do the trick for us either...we had to set the dataProvider to null.

HTH
-adrian

Dharmendra Chauhan wrote:


*
Hi All,
      Thanks for the response.

1) I agree with the fact - that memory is not necessarily released just after you remove the items from datagrid.

Now my question is how long I have to wait for GC to run and If they are eligible for GC then memory should be coming down after I issue Sytem.gc().

Why Memory usage is not coming down even after Force GC  ???

1) I do not have any event listerner attached to dataGrid or ArrayCollection, In fact, In my sample App , I just crated a data Grid with data provider and thats it.


I suspect , dataGrid does not release its itemerenderer even after removing all item

After digging the DG code I found following .
 Why FreeItemRenderersTable is   Strongly Referenced  ??


  public function DataGridBase()
    {
        super();

        listType = "vertical";
defaultRowCount = 7; // default number of rows is 7
        columnMap = {};
        freeItemRenderersTable = new Dictionary(false);
    }

Is this the only reason for itemrenderes not being eligible for GC ??

Please throw some light on it

Regards,
Dharmendra
   *





--- In flexcoders@yahoogroups.com, Pedro Sena <sena.pe...@...> wrote:
>
> The memory is not necessarily released just after you remove the items from
> datagrid.
>
> Removing them, you make them eligible by the garbage collector, but this
> does not necessarily means that it will be collected.
>
> HTH,
>
> PS
>
> On Sat, Jun 6, 2009 at 3:02 PM, Dharmendra Chauhan
> <chauhan_i...@...>wrote:
>
> >
> >
> > Hi All,
> > My DataGrid based application running into a Memory issue.The issue is
> > dataGrid does not release the memory even after emptying it.
> > Initially I thought Its my code which is causing the issue, but later I > > crated a sample application with just a dataGrid and a ArraCollection (no
> > eventListener) and found the same issue.
> >
> > Memory should come down at least some MB when I remove all item from data
> > provider.
> >
> > Memory usage with 10k row - 220 MB
> >
> > Memory usage after removing all item - STILL 220 MB
> >
> > Is this the standard behavior of datGird or do i need to apply some
> > workaround to get rid of this ?
> >
> > Regards,
> > Dharmendra
> >
> > > >
>
>
>
> --
> /**
> * Pedro Sena
> * Systems Architect
> * Sun Certified Java Programmer
> * Sun Certified Web Component Developer
> */
>


Reply via email to