<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rel=me &#187; gc</title>
	<atom:link href="http://rel.me/t/gc/feed/" rel="self" type="application/rss+xml" />
	<link>http://rel.me</link>
	<description>programming, objective-c, cocoa, iphone, c</description>
	<lastBuildDate>Wed, 01 Feb 2012 07:26:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GC and ObjectSpace</title>
		<link>http://rel.me/2007/08/24/gc-and-objectspace/</link>
		<comments>http://rel.me/2007/08/24/gc-and-objectspace/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 17:01:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gc]]></category>
		<category><![CDATA[objectspace]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">/2007/09/05/gc-and-objectspace</guid>
		<description><![CDATA[I saw this at the Rails Edge conference and thought it was cool; aside from its really expensive to implement in JRuby. 1 2 3 4 5 6 7 8 9 10 &#62;&#62; GC.disable =&#62; false &#62;&#62; instances = 0 =&#62; 0 &#62;&#62; ObjectSpace.each_object(Artist) { &#124;a&#124; instances += 1 } =&#62; 0 &#62;&#62; Artist.find(:all, :limit [...]]]></description>
			<content:encoded><![CDATA[<p>I saw this at the Rails Edge conference and thought it was cool; aside from its <a href="http://ola-bini.blogspot.com/2007/07/objectspace-to-have-or-not-to-have.html">really expensive to implement in JRuby</a>.</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt>5<tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }">&gt;&gt; <span class="co">GC</span>.disable<tt>
</tt>=&gt; <span class="pc">false</span><tt>
</tt>&gt;&gt; instances = <span class="i">0</span><tt>
</tt>=&gt; <span class="i">0</span><tt>
</tt>&gt;&gt;  <span class="co">ObjectSpace</span>.each_object(<span class="co">Artist</span>) { |a| instances += <span class="i">1</span> }<tt>
</tt>=&gt; <span class="i">0</span><tt>
</tt>&gt;&gt; <span class="co">Artist</span>.find(<span class="sy">:all</span>, <span class="sy">:limit</span> =&gt; <span class="i">5</span>)<tt>
</tt>=&gt; [<span class="c">#&lt;Artist:0x327d348 @attributes={....</span><tt>
</tt>&gt;&gt;  <span class="co">ObjectSpace</span>.each_object(<span class="co">Artist</span>) { |a| instances += <span class="i">1</span> }<tt>
</tt>=&gt; <span class="i">5</span></pre>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2007/08/24/gc-and-objectspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

