PHP clearing memory for an array of objects
<p>I have a class, which (among other things) contains a simple array of objects instanced from another class.  (This array is small - containing only 1 to perhaps 4 objects.)</p>

<p>In the __destruct method of the first class I want to clear the contents (free the memory) of this array of objects.  In order to do this, do I:</p>

<ol>
<li><p>iterate through the array, setting each index = null, then finally setting the array = null?</p></li>
<li><p>simply set the array = null?</p></li>
</ol>