Re: [flexcoders] Module Memory Leaks

2010-03-10 Thread Greg Hess
Hi Guys,

Would calling image.unloadAndStop() in a dispose routine for item rederers
who load runtime images be equivalent to setting the image source to null
and calling validateNow()?

Thanks,

Greg

On Fri, Feb 12, 2010 at 5:16 PM, Alex Harui aha...@adobe.com wrote:



 Runtime-loaded images need to be “disposed()”  Set the source to null and
 let it validate or call validateNow().

 I’m not sure about embedded image assets.  I’ll try to find time to look
 into that.

 We’ve found two  remoteobject bugs recently.  One is that, on every call, a
 few bytes leak.  It isn’t that bad but if it causes fragmentation it can add
 up over time.  The other is that if you instantiate a new RemoteObject and
 try to get rid of it, you can’t and it seems to leak a decent chunk of
 memory.  I’m pretty sure the first bug will be fixed in 10.1.  The other was
 only recently reported so I don’t know if it will make 10.1, and most folks
 I hope aren’t creating and destroying RemoteObjects very often.


 On 2/12/10 7:39 AM, Battershall, Jeff jeff.battersh...@dowjones.com
 wrote:






 Thanks Alex,

 I had gone around and around to get a certain module to unload and was
 unable to determine the cause.  Your article was very informative and my
 suspicion is that an image loaded at runtime was at fault.  But that really
 isn’t the same thing as compile-time embedded assets, is it?

 As far as remote objects are concerned – if they are invoked via some sort
 of Command class, that should avoid this problem, am I right?

 Jeff


 --

 *From:* flexcoders@yahoogroups.com 
 [mailto:flexcoders@yahoogroups.comflexcoders@yahoogroups.com]
 *On Behalf Of *Alex Harui
 *Sent:* Thursday, February 11, 2010 6:39 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Module Memory Leaks



 In Flex 4, styles are “per-module” and thus much less likely to leak.
  That’s the only change.  Everything else is the same.

 Are you seeing evidence that embedded image assets are leaking?


 On 2/11/10 4:24 AM, Battershall, Jeff jeff.battersh...@dowjones.com
 wrote:





 Getting modules to fully unload has been something I’ve spent (wasted?) a
 good deal of time on in the past and I’ve just finished reading with great
 interest, Alex’s article on the subject:
 http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

 My question is – how much of this is resolved in Flex 4?  Because if most
 or all of the issues have been addressed, I’ll simply abandon my Flex 3
 development of module-based applications and move to Flex 4 right now,
 especially given that Flex 4’s release is imminent (early spring?).

 Of particular concern is the bit in Alex’s article about unloading images
 and the fact that image assets could be loaded via Stylesheets, etc.

 Jeff Battershall
 Application Architect
 Dow Jones Indexes
 jeff.battersh...@dowjones.com
 (609) 520-5637 (p)
 (484) 477-9900 (c)







 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui

 



Re: [flexcoders] Module Memory Leaks

2010-03-10 Thread Alex Harui
I don’t know for sure, but I don’t think so.  UnloadAndStop might only work for 
SWF content.  The profiler will tell you the answer.


On 3/10/10 1:12 PM, Greg Hess flexeff...@gmail.com wrote:






Hi Guys,

Would calling image.unloadAndStop() in a dispose routine for item rederers who 
load runtime images be equivalent to setting the image source to null and 
calling validateNow()?

Thanks,

Greg

On Fri, Feb 12, 2010 at 5:16 PM, Alex Harui aha...@adobe.com wrote:

Runtime-loaded images need to be “disposed()”  Set the source to null and let 
it validate or call validateNow().

I’m not sure about embedded image assets.  I’ll try to find time to look into 
that.

We’ve found two  remoteobject bugs recently.  One is that, on every call, a few 
bytes leak.  It isn’t that bad but if it causes fragmentation it can add up 
over time.  The other is that if you instantiate a new RemoteObject and try to 
get rid of it, you can’t and it seems to leak a decent chunk of memory.  I’m 
pretty sure the first bug will be fixed in 10.1.  The other was only recently 
reported so I don’t know if it will make 10.1, and most folks I hope aren’t 
creating and destroying RemoteObjects very often.


On 2/12/10 7:39 AM, Battershall, Jeff jeff.battersh...@dowjones.com 
http://jeff.battersh...@dowjones.com  wrote:






Thanks Alex,

I had gone around and around to get a certain module to unload and was unable 
to determine the cause.  Your article was very informative and my suspicion is 
that an image loaded at runtime was at fault.  But that really isn’t the same 
thing as compile-time embedded assets, is it?

As far as remote objects are concerned – if they are invoked via some sort of 
Command class, that should avoid this problem, am I right?

Jeff




From: flexcoders@yahoogroups.com http://flexcoders@yahoogroups.com  
[mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui
Sent: Thursday, February 11, 2010 6:39 PM
To: flexcoders@yahoogroups.com http://flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Module Memory Leaks



In Flex 4, styles are “per-module” and thus much less likely to leak.  That’s 
the only change.  Everything else is the same.

Are you seeing evidence that embedded image assets are leaking?


On 2/11/10 4:24 AM, Battershall, Jeff jeff.battersh...@dowjones.com 
http://jeff.battersh...@dowjones.com  wrote:





Getting modules to fully unload has been something I’ve spent (wasted?) a good 
deal of time on in the past and I’ve just finished reading with great interest, 
Alex’s article on the subject:
http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

My question is – how much of this is resolved in Flex 4?  Because if most or 
all of the issues have been addressed, I’ll simply abandon my Flex 3 
development of module-based applications and move to Flex 4 right now, 
especially given that Flex 4’s release is imminent (early spring?).

Of particular concern is the bit in Alex’s article about unloading images and 
the fact that image assets could be loaded via Stylesheets, etc.

Jeff Battershall
Application Architect
Dow Jones Indexes
jeff.battersh...@dowjones.com http://jeff.battersh...@dowjones.com
(609) 520-5637 (p)
(484) 477-9900 (c)







--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


RE: [flexcoders] Module Memory Leaks

2010-02-12 Thread Battershall, Jeff
Thanks Alex,

I had gone around and around to get a certain module to unload and was unable 
to determine the cause.  Your article was very informative and my suspicion is 
that an image loaded at runtime was at fault.  But that really isn't the same 
thing as compile-time embedded assets, is it?

As far as remote objects are concerned - if they are invoked via some sort of 
Command class, that should avoid this problem, am I right?

Jeff


From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Thursday, February 11, 2010 6:39 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Module Memory Leaks



In Flex 4, styles are per-module and thus much less likely to leak.  That's 
the only change.  Everything else is the same.

Are you seeing evidence that embedded image assets are leaking?


On 2/11/10 4:24 AM, Battershall, Jeff jeff.battersh...@dowjones.com wrote:





Getting modules to fully unload has been something I've spent (wasted?) a good 
deal of time on in the past and I've just finished reading with great interest, 
Alex's article on the subject:
http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

My question is - how much of this is resolved in Flex 4?  Because if most or 
all of the issues have been addressed, I'll simply abandon my Flex 3 
development of module-based applications and move to Flex 4 right now, 
especially given that Flex 4's release is imminent (early spring?).

Of particular concern is the bit in Alex's article about unloading images and 
the fact that image assets could be loaded via Stylesheets, etc.

Jeff Battershall
Application Architect
Dow Jones Indexes
jeff.battersh...@dowjones.com
(609) 520-5637 (p)
(484) 477-9900 (c)






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui






Re: [flexcoders] Module Memory Leaks

2010-02-12 Thread Alex Harui
Runtime-loaded images need to be “disposed()”  Set the source to null and let 
it validate or call validateNow().

I’m not sure about embedded image assets.  I’ll try to find time to look into 
that.

We’ve found two  remoteobject bugs recently.  One is that, on every call, a few 
bytes leak.  It isn’t that bad but if it causes fragmentation it can add up 
over time.  The other is that if you instantiate a new RemoteObject and try to 
get rid of it, you can’t and it seems to leak a decent chunk of memory.  I’m 
pretty sure the first bug will be fixed in 10.1.  The other was only recently 
reported so I don’t know if it will make 10.1, and most folks I hope aren’t 
creating and destroying RemoteObjects very often.

On 2/12/10 7:39 AM, Battershall, Jeff jeff.battersh...@dowjones.com wrote:






Thanks Alex,

I had gone around and around to get a certain module to unload and was unable 
to determine the cause.  Your article was very informative and my suspicion is 
that an image loaded at runtime was at fault.  But that really isn’t the same 
thing as compile-time embedded assets, is it?

As far as remote objects are concerned – if they are invoked via some sort of 
Command class, that should avoid this problem, am I right?

Jeff




From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Alex Harui
Sent: Thursday, February 11, 2010 6:39 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Module Memory Leaks



In Flex 4, styles are “per-module” and thus much less likely to leak.  That’s 
the only change.  Everything else is the same.

Are you seeing evidence that embedded image assets are leaking?


On 2/11/10 4:24 AM, Battershall, Jeff jeff.battersh...@dowjones.com wrote:





Getting modules to fully unload has been something I’ve spent (wasted?) a good 
deal of time on in the past and I’ve just finished reading with great interest, 
Alex’s article on the subject:
http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

My question is – how much of this is resolved in Flex 4?  Because if most or 
all of the issues have been addressed, I’ll simply abandon my Flex 3 
development of module-based applications and move to Flex 4 right now, 
especially given that Flex 4’s release is imminent (early spring?).

Of particular concern is the bit in Alex’s article about unloading images and 
the fact that image assets could be loaded via Stylesheets, etc.

Jeff Battershall
Application Architect
Dow Jones Indexes
jeff.battersh...@dowjones.com
(609) 520-5637 (p)
(484) 477-9900 (c)







--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui


Re: [flexcoders] Module Memory Leaks

2010-02-11 Thread Alex Harui
In Flex 4, styles are “per-module” and thus much less likely to leak.  That’s 
the only change.  Everything else is the same.

Are you seeing evidence that embedded image assets are leaking?


On 2/11/10 4:24 AM, Battershall, Jeff jeff.battersh...@dowjones.com wrote:






Getting modules to fully unload has been something I’ve spent (wasted?) a good 
deal of time on in the past and I’ve just finished reading with great interest, 
Alex’s article on the subject:
http://blogs.adobe.com/aharui/2009/08/what_we_know_about_unloading_m.html

My question is – how much of this is resolved in Flex 4?  Because if most or 
all of the issues have been addressed, I’ll simply abandon my Flex 3 
development of module-based applications and move to Flex 4 right now, 
especially given that Flex 4’s release is imminent (early spring?).

Of particular concern is the bit in Alex’s article about unloading images and 
the fact that image assets could be loaded via Stylesheets, etc.

Jeff Battershall
Application Architect
Dow Jones Indexes
jeff.battersh...@dowjones.com
(609) 520-5637 (p)
(484) 477-9900 (c)







--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui