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.)
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:
iterate through the array, setting each index = null, then finally setting the array = null?
simply set the array = null?
Aucun commentaire:
Enregistrer un commentaire