> it does not seem to be collected

What are you doing that you think should cause it to be collected? Do you keep 
allocating memory indefinitely? An object may never get garbage collected 
unless the Player decides it needs the memory.

> Should one have to remove all objects created through the 
> or just on the child being removed?

I'm not really following your texavery >> toto >> titi example because you 
didn't explain which one you're removing. Let's suppose you're removing toto as 
a child of texavery. If you're not keeping any references to toto or titi, then 
both become eligible for garbage collection; the fact that toto holds a 
reference to its child titi doesn't matter, because the two of them are 
isolated from all other objects.

> Is there a way to force the garbage collection clean up,
> or destroy an object completely?

There are no APIs for controlling garbage collection. Once there are no 
references to an object, it becomes eligible for garbage collection. It doesn't 
mean that it actually gets garbage collected.

Is your app exhibiting unbounded memory growth to the point where it consumes 
all the machine's memory?

- Gordon

________________________________________
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Harald 
Dehn
Sent: Thursday, June 22, 2006 3:55 AM
To: flexcoders@yahoogroups.com
Subject: WG: [flexcoders] Garbage collection and removeChild [Flex 2 beta 3]?

Is there any answer to this thread? I do have the same problems with the 
garbage collector.
 
 
________________________________________
Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von 
sourcecoderia
Gesendet: Dienstag, 20. Juni 2006 18:06
An: flexcoders@yahoogroups.com
Betreff: [flexcoders] Garbage collection and removeChild [Flex 2 beta 3]?
>From the documents when using removeChild the removed display item is 
added to the garbage collection for later removal. However I'm 
reusing component instances and creating new instance of the same (a 
sort of tabbed interface where children are created and removed at 
will.

The listeners for the child component are removed and other objects 
set to null, but; it does not seem to be collected.

Should one have to remove all objects created through the chain or 
just on the child being removed?

I.e. if I instantiate a class called toto through a component called 
texavery and toto creates an instance of titi do I have to unload all 
objects created by or in the children following the entire chain 

texavery >> toto >> titi 

where each one unloads it's owned/created objects? 
Or is this cleaned up from the child object on down?

Is there a way to force the garbage collection clean up, or destroy 
an object completely?

I did wait to see if it unloaded 25mins and still no change in the 
process memory usage. However I'm only at this time unloading objects 
created by the child component and not it's children's objects.

So unload the entire chain or just the first ?
Is removeChild working properly ?

How is this supposed to work, and are there any best practices in 
regards to this?

Thanks, 

Jason
 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to