<div dir="ltr">Strange, in Pharo 3 it behaves the same way. So probably not directly Spur related.<div><br></div><div>-- Pavel<br><div class="gmail_extra"><br><div class="gmail_quote">2017-01-26 14:52 GMT+01:00 Clément Bera <span dir="ltr"><<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Is it the same behavior in Pharo 3 ? <div><br></div><div>Just wondering if this is a Spur issue or if it is non related to Spur. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 26, 2017 at 2:38 PM, Pavel Krivanek <span dir="ltr"><<a href="mailto:pavel.krivanek@gmail.com" target="_blank">pavel.krivanek@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div dir="ltr">Hi,<div><br></div><div>in Pharo and in Squeak, if you try to print:</div><div><br></div><div>Point allInstances size.</div><div><br></div><div>several times, you will get fastly growing number of Point instances in most cases. But when you do:</div><div><br></div><div><font face="monospace, monospace">Smalltalk garbageCollect. Point allInstances size.</font><br></div><br>The number of instances is quite stable.<div><br></div><div>I realized that about every 5 milliseconds two new Point instances are created and not collected in reasonable time. I tried to find what points to them and I realized that nothing. That two instances contain display size so it was easy to find the place where these points are created. In Pharo it is in</div><div><br></div><div><font face="monospace, monospace">MorphicUIManager>>#checkForNew<wbr>DisplaySize</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span class="m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap">      </span>"Check whether the screen size has changed and if so take appropriate actions"</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><span class="m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>Display extent = DisplayScreen actualScreenSize ifTrue: [^ Display].</font></div><div><font face="monospace, monospace"><span class="m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap">     </span>DisplayScreen startUp.</font></div><div><font face="monospace, monospace"><span class="m_2773052710060290581m_2178599790693675799gmail-Apple-tab-span" style="white-space:pre-wrap">   </span>World restoreMorphicDisplay.</font></div><div><br></div><div>As you can see in the code, the two point instances are only very temporary objects. And with some experiments I realized that that behavior is not Point specific (eg. some problem with the @ primitive). Because if you replace the code of the method with only Object basicNew, the growth of Object instances is similar. See the attached script.</div><div><br></div><div>pharo-ui Pharo st <a href="http://script2.st" target="_blank">script2.st</a><br></div><div><br></div><div>Cheers,<br></div><div>-- Pavel</div><div><br></div><div><br></div><div><br></div></div>
<br></blockquote></div><br></div>
<br></blockquote></div><br></div></div></div>