Are you saying that afterwards the memory number does not drop back down even 
after you force a garbage collection using the profiler?

If so, use the profiler to see what objects are sticking around.  There's a 
tutorial on how to use it on my blog.

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 Manu Dhanda
Sent: Monday, February 09, 2009 10:07 PM
To: [email protected]
Subject: RE: [flexcoders] DataGrid updateComplete causes lots of memory leak.


Yes, am using the same line of code.
updateComplete=this.callLater(setVerticalPosition);

private function setVerticalPosition():void{
productsGrid.verticalScrollPosition =
getVerScrollPos(productsGrid.selectedItems);//which returns an int.
}

Now when I use profiler to see the memory use. The bar depicting the memory
use keep on going up, drops all of a sudden then again goes up to a new high
and so on(repeat the same criteria), until user actually switch his view to
the screen having that datagrid. After that it will become a straight
parallel line.

WhereAs if I remove this one line of code, i.e. updateComplete(...) it
achieves that straight parallel line much before and you don't even need to
go to that particular view/screen.

Any workaround or any other solution would be great.

Thanks,
Manu.

Alex Harui wrote:
>
> Hopefully your code is:
> updateComplete=this.callLater(setVerticalScrollBarMethod);
>
> Depending on what that code does, it might use a bunch of memory, but if
> it gets freed later, it isn't a leak. The profiler will help you
> determine if there really is a leak.
>
> 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 Manu Dhanda
> Sent: Monday, February 09, 2009 8:21 PM
> To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] DataGrid updateComplete causes lots of memory leak.
>
>
> Hi Guyz,
> I have a viewstack holding two DG's. When I double click on an item in
> first
> DG, it should switch to the second DG and select the corresponding item in
> that DG and scroll down to that item.
>
> If I set verticalscrollbarposition something like..
> updateComplete=this.callLater(setVerticalScrollBarMethod());
>
> It causes a lot of memory leak until unless it is switched to the final
> view(2nd DG with highlighted item.)
> Can anyone tell me what I can use as an alternative to updateComplete ??
>
> -Manu.
> --
> View this message in context:
> http://www.nabble.com/DataGrid-updateComplete-causes-lots-of-memory-leak.-tp21927484p21927484.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>
>

--
View this message in context: 
http://www.nabble.com/DataGrid-updateComplete-causes-lots-of-memory-leak.-tp21927484p21928252.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to