Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Preventing Memory Leaks

0 views
Skip to first unread message

Isaac Gerg

unread,
Apr 8, 2003, 3:09:05 PM4/8/03
to
I created a class and then created a variable sized array of a class..
myObject: array of Object;
setlength(myObject, 5);

Now, I want to get rid of this object and allow other apps to use its
memory now.

Do i do:
A) setlength(myobject, 0);
B) myObject := nil;
C) myObject[0...length of object].Free
D) FreeandNil(myObject[0...length of object]);

The ... means as in a for loop going through and individually removing
each object in the array.

I would appreciate any help.

Regards,
Isaac Gerg


Marco van de Voort

unread,
Apr 8, 2003, 3:56:11 PM4/8/03
to
In article <b6v6n4$mi0$1...@f04n12.cac.psu.edu>, Isaac Gerg wrote:

[comp.lang.pascal.misc stripped, is not about Delphi)

(C OR D) and then A.

0 new messages