Does that mean that Free itself reclaims the memory used by the object's
fields and properties but does not release the memory used by the TObject or
pointer itself, where as setting it to nil or executing Destroy does, or
does Destroy do something different?

 

All memory is released including TObject but the variable pointing to the
TObject (fe: SCStrings) isn't set to nil. It still points to where the
TObject was. Warning: setting a TObject variable to nil does not free the
object unless it is reference counted! Strings and COM style interfaces are
reference counted. Pascal is not VB.
 
Ludo
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to