Hi, <br>&nbsp;I just wanted to share with you that we had problems running too many tests with SUnit because of memory use.<br>&nbsp;We have around 15,000 unit tests and while running them the memory grew from 80 megs to 700 megs (we use VisualAge) and therefore, the machine became really slow...<br>
&nbsp;Anyway, we realized the memory was not freed because the tests referenced objects from their instance variables. Therefore we added a method that puts &quot;nil&quot; in all test&#39;s instance variables (but &#39;selector&#39;). <br>
&nbsp;The amazing thing is that not only running the test now do not makes the image to grow but it takes 50% less time to run them! So anyway, we are happy with that and maybe this change is useful to other people.<br>&nbsp;Here is the code: <br>
<br>TestCase&gt;&gt;runCase<br><br>&nbsp;&nbsp;&nbsp; [self setUp.<br>&nbsp;&nbsp;&nbsp; self performTest] sunitEnsure: [self tearDown;cleanUpInstanceVariables]<br><br>TestCase&gt;&gt;cleanUpInstanceVariables<br><br>&nbsp;&nbsp;&nbsp; (TestCase allInstVarNames size + 1) to: self class allInstVarNames size do: [ :index | self instVarAt: index put: nil ]<br>
<br><br>Bye,<br>Hernan.<br>