<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">Perhaps in neat and tidy situations, but I
      invite your comments on<br>
      <br>
      test1<br>
      "<br>
      ThreeGCTest test1<br>
      "<br>
      &nbsp;&nbsp;&nbsp; | object registry other say |<br>
      &nbsp;&nbsp;&nbsp; <br>
      &nbsp;&nbsp;&nbsp; Smalltalk garbageCollect.<br>
      &nbsp;&nbsp;&nbsp; Transcript cr.<br>
      &nbsp;&nbsp;&nbsp; say _ [ :str |<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Transcript show: Smalltalk garbageCollect
      asStringWithCommas,' ',str; cr<br>
      &nbsp;&nbsp;&nbsp; ].<br>
      &nbsp;&nbsp;&nbsp; say value: 'start'.<br>
      &nbsp;&nbsp;&nbsp; registry := WeakRegistry new.<br>
      &nbsp;&nbsp;&nbsp; object := Object new.<br>
      &nbsp;&nbsp;&nbsp; other _ String new: 1024*102*16.<br>
      &nbsp;&nbsp;&nbsp; registry add: object executor: (ObjectFinalizer<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; receiver: [other _ nil]<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; selector: #value).<br>
      &nbsp;&nbsp;&nbsp; say value: 'created'.<br>
      &nbsp;&nbsp;&nbsp; object := nil. <br>
      &nbsp;&nbsp;&nbsp; say value: 'gc1'.<br>
      &nbsp;&nbsp;&nbsp; say value: 'gc2'.<br>
      &nbsp;&nbsp;&nbsp; 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>
  </body>
</html>