<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Unable to access /var/www/html/rogue-development/blog2/wp-content/advanced-cache.php in <b>/var/www/html/rogue-development/blog2/wp-settings.php</b> on line <b>62</b><br />
<br />
<b>Warning</b>:  include(/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/var/www/html/rogue-development/blog2/wp-settings.php</b> on line <b>62</b><br />
<br />
<b>Warning</b>:  include() [<a href='function.include'>function.include</a>]: Failed opening '/var/www/html/rogue-development/blog2/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in <b>/var/www/html/rogue-development/blog2/wp-settings.php</b> on line <b>62</b><br />
<br />
<b>Notice</b>:  add_option was called with an argument that is <strong>deprecated</strong> since version 2.3 with no alternative available. in <b>/var/www/html/rogue-development/blog2/wp-includes/functions.php</b> on line <b>3468</b><br />
<br />
<b>Notice</b>:  register_sidebar_widget is <strong>deprecated</strong> since version 2.8! Use wp_register_sidebar_widget() instead. in <b>/var/www/html/rogue-development/blog2/wp-includes/functions.php</b> on line <b>3382</b><br />
<br />
<b>Notice</b>:  register_widget_control is <strong>deprecated</strong> since version 2.8! Use wp_register_widget_control() instead. in <b>/var/www/html/rogue-development/blog2/wp-includes/functions.php</b> on line <b>3382</b><br />
<?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: Two event handler simplifications</title>
	<atom:link href="http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/</link>
	<description>Comments and thoughts on technology from Marc Hughes</description>
	<lastBuildDate>Sun, 30 Jan 2011 18:36:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Marc</title>
		<link>http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/comment-page-1/#comment-546</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Mon, 02 Feb 2009 14:17:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=314#comment-546</guid>
		<description>@Alan I&#039;m not sure where this memory leak would occur.  The component would have a single reference to the anonymous function.  When the component went away there would be no references to that function anymore so it should be a candidate for garbage collection.

The reason I think that... If you do something like this:

myButton.addEventListener(MouseEvent.CLICK, function(event:Event) {mainStack.selectedIndex=1;} ,false,0,true);
(Don&#039;t ever do that!)

It&#039;ll make a weak reference to the anonymous method.  That method will immediately become a candidate for GC and you&#039;ll get some very odd bugs with it being collected at seemingly random times.  That would make me think that when the component goes away, the only reference to the function would go away.

But maybe I&#039;m missing something important, I admit I don&#039;t know how the internals of the anonymous functions work.</description>
		<content:encoded><![CDATA[<p>@Alan I&#8217;m not sure where this memory leak would occur.  The component would have a single reference to the anonymous function.  When the component went away there would be no references to that function anymore so it should be a candidate for garbage collection.</p>
<p>The reason I think that&#8230; If you do something like this:</p>
<p>myButton.addEventListener(MouseEvent.CLICK, function(event:Event) {mainStack.selectedIndex=1;} ,false,0,true);<br />
(Don&#8217;t ever do that!)</p>
<p>It&#8217;ll make a weak reference to the anonymous method.  That method will immediately become a candidate for GC and you&#8217;ll get some very odd bugs with it being collected at seemingly random times.  That would make me think that when the component goes away, the only reference to the function would go away.</p>
<p>But maybe I&#8217;m missing something important, I admit I don&#8217;t know how the internals of the anonymous functions work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: greg</title>
		<link>http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/comment-page-1/#comment-545</link>
		<dc:creator>greg</dc:creator>
		<pubDate>Mon, 02 Feb 2009 13:35:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=314#comment-545</guid>
		<description>Huh, never thought about encasing a simple event like the 2nd method. Cool and thanks!</description>
		<content:encoded><![CDATA[<p>Huh, never thought about encasing a simple event like the 2nd method. Cool and thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/comment-page-1/#comment-544</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Mon, 02 Feb 2009 04:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=314#comment-544</guid>
		<description>You&#039;re not worried about memory leaks.  Maybe in a small app, bu tin anything larger....just seems to me not worth the shortcut.</description>
		<content:encoded><![CDATA[<p>You&#8217;re not worried about memory leaks.  Maybe in a small app, bu tin anything larger&#8230;.just seems to me not worth the shortcut.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/comment-page-1/#comment-543</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Mon, 02 Feb 2009 00:35:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=314#comment-543</guid>
		<description>As mentioned, I use either method in only the simple cases.  Anything more involved, such as being invoked from multiple places, deserves a proper handler.</description>
		<content:encoded><![CDATA[<p>As mentioned, I use either method in only the simple cases.  Anything more involved, such as being invoked from multiple places, deserves a proper handler.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: reyco1</title>
		<link>http://www.rogue-development.com/blog2/2009/02/two-event-handler-simplifications/comment-page-1/#comment-542</link>
		<dc:creator>reyco1</dc:creator>
		<pubDate>Sun, 01 Feb 2009 23:52:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=314#comment-542</guid>
		<description>Well, using an anonymous function can be a bit of a double edge sword, especially when you need to execute a handler from two sources. Just me 2 cents.</description>
		<content:encoded><![CDATA[<p>Well, using an anonymous function can be a bit of a double edge sword, especially when you need to execute a handler from two sources. Just me 2 cents.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

