C
Chumpmeister
Can someone confirm this for me:
I have a collection, e.g. a Vector or Array and have stuffed a few
objects into it. After using the collection, such as iterating it's
contents, I then nullify the collection. At this point are the
collection's object's eligible for garbage collection, as well as the
Vector itself?.. i.e. I haven't caused a memory leak. I'm assuming
here that there are no other references to the objects that I placed
in collection.
I ask this because I've read numerous articles warning that 'leaving'
objects in an array is the easiest way to create memory leaks... but
surely a Vector for example, is simply an object that references the
objects it 'contains'.
thanks
I have a collection, e.g. a Vector or Array and have stuffed a few
objects into it. After using the collection, such as iterating it's
contents, I then nullify the collection. At this point are the
collection's object's eligible for garbage collection, as well as the
Vector itself?.. i.e. I haven't caused a memory leak. I'm assuming
here that there are no other references to the objects that I placed
in collection.
I ask this because I've read numerous articles warning that 'leaving'
objects in an array is the easiest way to create memory leaks... but
surely a Vector for example, is simply an object that references the
objects it 'contains'.
thanks