<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Weak Activation Object	</title>
	<atom:link href="https://jessewarden.com/2007/09/weak-activation-object.html/feed" rel="self" type="application/rss+xml" />
	<link>https://jessewarden.com/2007/09/weak-activation-object.html</link>
	<description>Software &#124; Fitness &#124; Gaming</description>
	<lastBuildDate>Mon, 17 Sep 2007 21:32:24 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Robert Penner		</title>
		<link>https://jessewarden.com/2007/09/weak-activation-object.html/comment-page-1#comment-11912</link>

		<dc:creator><![CDATA[Robert Penner]]></dc:creator>
		<pubDate>Mon, 17 Sep 2007 21:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/2007/09/weak-activation-object.html#comment-11912</guid>

					<description><![CDATA[I definitely sympathize with the shock of: &quot;What!? I can&#039;t do this anymore?&quot; I would say, though, that  this is another case where the strictness of AS3 encourages better practices. If you look at this issue through the lens of, &quot;How can I minimize memory leaks?&quot;, things come into focus. The AS2 local variable approach is more convenient up-front, but it easily leads to memory leaks. 

&#062; Robert Pennerâ€<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />s original Tween classes actually kept a global reference of all crated Tween instances in a static array, so there was always at least 1 reference.

I assume you&#039;re referring to MovieClip._listeners (to which MovieClip.addListener() adds the AS2 Tween instance). Yes, the reference there allows you to use local variables for Tweens without being garbage collected, but it has its own undesirable side effects. An AS2 Tween can get stranded in MovieClip._listeners, where it keeps running and there&#039;s no way to tell it to stop. If you aren&#039;t careful (e.g. &quot;always stop() the Tween first), you can get all kinds of anonymous Tween objects floating around. In some cases, they would actually be fighting over the same movie clip.  

To me, having an object in memory &quot;still doing stuff&quot;, but beyond my script&#039;s control, is kinda creepy. It&#039;s like the planet in &quot;Aliens&quot; that has broken off all communications. As Ripley intoned: 
&quot;I say we take off and nuke the entire site from orbit. It&#039;s the only way to be sure.&quot; 

The AS3 garbage collector is basically Ripley. If your object needs to be alive and doing stuff, keep a line of communication open. Otherwise, yousa object gonna die. It&#039;s the price we pay to avoid memory leaks and crappy sequels.]]></description>
			<content:encoded><![CDATA[<p>I definitely sympathize with the shock of: &#8220;What!? I can&#8217;t do this anymore?&#8221; I would say, though, that  this is another case where the strictness of AS3 encourages better practices. If you look at this issue through the lens of, &#8220;How can I minimize memory leaks?&#8221;, things come into focus. The AS2 local variable approach is more convenient up-front, but it easily leads to memory leaks. </p>
<p>&gt; Robert Pennerâ€™s original Tween classes actually kept a global reference of all crated Tween instances in a static array, so there was always at least 1 reference.</p>
<p>I assume you&#8217;re referring to MovieClip._listeners (to which MovieClip.addListener() adds the AS2 Tween instance). Yes, the reference there allows you to use local variables for Tweens without being garbage collected, but it has its own undesirable side effects. An AS2 Tween can get stranded in MovieClip._listeners, where it keeps running and there&#8217;s no way to tell it to stop. If you aren&#8217;t careful (e.g. &#8220;always stop() the Tween first), you can get all kinds of anonymous Tween objects floating around. In some cases, they would actually be fighting over the same movie clip.  </p>
<p>To me, having an object in memory &#8220;still doing stuff&#8221;, but beyond my script&#8217;s control, is kinda creepy. It&#8217;s like the planet in &#8220;Aliens&#8221; that has broken off all communications. As Ripley intoned:<br />
&#8220;I say we take off and nuke the entire site from orbit. It&#8217;s the only way to be sure.&#8221; </p>
<p>The AS3 garbage collector is basically Ripley. If your object needs to be alive and doing stuff, keep a line of communication open. Otherwise, yousa object gonna die. It&#8217;s the price we pay to avoid memory leaks and crappy sequels.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Asai		</title>
		<link>https://jessewarden.com/2007/09/weak-activation-object.html/comment-page-1#comment-11514</link>

		<dc:creator><![CDATA[Asai]]></dc:creator>
		<pubDate>Sat, 15 Sep 2007 23:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/2007/09/weak-activation-object.html#comment-11514</guid>

					<description><![CDATA[I&#039;d like to say that your humility in admitting when you&#039;re wrong is appreciated by all...your daughter has a good daddy.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to say that your humility in admitting when you&#8217;re wrong is appreciated by all&#8230;your daughter has a good daddy.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
