Preventing Memory Leaks 
Author Message
 Preventing Memory Leaks

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.

Isaac Gerg

Sun, 25 Sep 2005 03:09:05 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Memory leaks with TQuery.ExecSQL

2. Memory leak problem in BDE?

3. Memory Leak with NT Service + BDE + M$ ACCESS 97 + Socket

4. memory leak in D2.01 + BDE 3.11

5. IDAPI Memory leak

6. Solve prepare memory leak in Oracle

7. QR memory leak

8. BDE memory leaks and ACCESS 97 Alternative ?

9. TQuery Memory Leak Again

10. TQuery Memory Leak

11. TMemoField.SaveToStream leaking memory like a sieve


Powered by phpBB® Forum Software