Don't know for sure, but the DG leaves them parented and invisible.
Parenting is sort of expensive in Flex.  They should not get called
during invalidation unless they are invalid, and will pick up style
changes which might be to your advantage.

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel Freiman
Sent: Saturday, July 14, 2007 8:19 AM
To: [email protected]
Subject: Re: [flexcomponents] Repeatedly Instantiate a UITextField

 

Unfortunatley, I don't know the answer, but if you go with visible one
optimization is to set the property includeInLayout to false as well in
order to minimize processing and layout of UITextFields you can't see.

Daniel Freiman

On 7/14/07, reflexactions <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

I have a component where for one reason or another I need to 
instantiate a number of UITextField from time to time. 

So to be more effecient I am caching the components instead of 
repeatedly creating them.

What I wanted to know is whether when I "deactivate" them should I just 
set it visible=false or call removeChild i.e. is the add/remove child 
process the time consuming/resource intensive factor or is it the 
creation process. If they are just invisible are they going to soak up 
resources like being called during invalidations even though they are 
effectively "dormant".

Just thinking about the best strategy...

Thanks

 

 

Reply via email to