All the event listeners explicitly set through ActionScript in my
application use a weak reference, so i'd rule out that being a cause.

My Image source is an URL (http protocol) to the same domain with the
SWF.  I tried a simpler experiment playing with just the mx:Image and
the display list (that is, no DataGrid at all) What I further noticed
was when the first time adding the Image to the display list (with that
http source), upon removal, it is not garbage collected. All the
Profilers shows is 12 references to it, all Functions, most of them
being SWFLoader event handlers (all being from the Adobe SDK)

Subsequent additons of Image objects (brand new, using the "new"
operator) to the display list, and using source urls that point to
different image assets but within the same domain - upon their removal
from the display list, they are being garbage collected.

So is this a known fact the Flash retains in memory one Image object
(the first one) per souece domain and will never release it? Or it's a
bug?


--- In [email protected], "Tracy Spratt" <tr...@...> wrote:
>
> Does your renderer use any event listeners?  This is often a source of
> unsuspected references.
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
>   _____
>
> From: [email protected] [mailto:[email protected]]
On
> Behalf Of emc_rcsiki
> Sent: Friday, November 13, 2009 1:07 PM
> To: [email protected]
> Subject: [SPAM] [flexcoders] Garbage collection issues with mx:Image
> DataGrid custom item renderers!
>
>
>
>
>
> Hello,
>
> I am trying for days to figure out why the GC does not do it's work
when my
> plain mx:DataGrid uses a custom item renderer in one of it's columns
(plain
> mx:DataGridColumn object) that represents a plain mx:Image image.
>
> When the DataGrid is removed from the display list, Flex Profiler
reports it
> is still lives in memory, along with all item renderer instances, the
> columns (all the datagrid classes are still alive) , and including the
Image
> instances etc.
>
> IF I REMOVE the Image column from the DataGrid in source code and try
again,
> everything is been garbage collected. So it clearly has to do with
that
> column and in particular with the Image.
>
> Any ideas? I tried already tons of things, with no success, including
doing
> image.source = null, or image.load(null) in an "remove" event handler
in
> item renderer code etc.
>
> Please help!
>

Reply via email to