I usually follow what every example in Delphi manual does. There are certain 
cases where freeAndNil can cause an access violation:

Object.Free;
Object := nil;

Dave

Doug Hale <[EMAIL PROTECTED]> wrote:                             
 > And as a hint, try not to use the destructor Destroy
 > directly.
 > The documentation suggests using Free because it
 > checks whether the object for which you are calling
 > Free is Nil or not. If it is Nil, it will not call
 > Destroy.
 >   
 someobject.free still requires a valid someobject pointer with which to 
 call free.
 
 If you want the above behavior, you must call FreeAndNil(someobject).
 
 Doug
 
 
     
                                       

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

[Non-text portions of this message have been removed]

Reply via email to