<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 21.01.2013, at 15:05, Bob Arning <<a href="mailto:arning315@comcast.net">arning315@comcast.net</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
<font face="Georgia">Perhaps in neat and tidy situations, but I
invite your comments on<br></font></div></blockquote><div><br></div><div>The situation at hand was having to do with MCDefinitions in a WeakSet. Since MCDefinitions don't have finalizers, it won't make any difference. Of course it's possible to construct a chain of finalizers where even 3 GCs would not be enough.</div><div><br></div><div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; font-family: 'Lucida Grande'; font-size: 12px; "><div style="font-family: Helvetica; ">- Bert -</div><br class="Apple-interchange-newline"></span></div></div><br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000"><font face="Georgia">
<br>
test1<br>
"<br>
ThreeGCTest test1<br>
"<br>
| object registry other say |<br>
<br>
Smalltalk garbageCollect.<br>
Transcript cr.<br>
say _ [ :str |<br>
Transcript show: Smalltalk garbageCollect
asStringWithCommas,' ',str; cr<br>
].<br>
say value: 'start'.<br>
registry := WeakRegistry new.<br>
object := Object new.<br>
other _ String new: 1024*102*16.<br>
registry add: object executor: (ObjectFinalizer<br>
receiver: [other _ nil]<br>
selector: #value).<br>
say value: 'created'.<br>
object := nil. <br>
say value: 'gc1'.<br>
say value: 'gc2'.<br>
say value: 'gc3'.<br>
<br>
which produces:<br>
<br>
505,963,044 start<br>
504,291,464 created<br>
504,291,360 gc1<br>
505,962,536 gc2<br>
505,962,428 gc3<br>
<br>
Cheers,<br>
Bob<br>
<br>
</font>
<div class="moz-cite-prefix">On 1/21/13 3:28 PM, Bert Freudenberg
wrote:<br>
</div>
<blockquote cite="mid:9C005D24-66A9-4752-A6D3-BDDBB97DB275@freudenbergs.de" type="cite">
<pre wrap="">On 21.01.2013, at 14:05, <a class="moz-txt-link-abbreviated" href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">3 timesRepeat: [ Smalltalk garbageCollect].
</pre>
</blockquote>
<pre wrap="">Doing this 3 times is superstitious. It won't clean up more than doing it once.
IMHO an explicit GC is not necessary at all - what purpose does it serve?
- Bert -
</pre>
</blockquote>
<br>
</div>
<br></blockquote></div><br></body></html>