I don't think it's called anywhere in the source. It's called by the compiler 
after the destructor has finished. The same way that InitInstance is run before 
the constructor is called.

This way the memory for the object is already allocated before the first 
constructor is run (and not only after calling inherited and getting all the 
way to TObject) and it is only freed after the destructor has completed (so 
again, you aren't in limbo after calling inherited in the destructor).

> -----Original Message-----
> From: fpc-devel <fpc-devel-boun...@lists.freepascal.org> On Behalf
> Of Ryan Joseph
> Sent: Wednesday, 1 August 2018 01:36
> To: FPC developers' list <fpc-devel@lists.freepascal.org>
> Subject: [fpc-devel] FreeInstance
> 
> Looking at the FPC source now and it appears FreeInstance is a
> hidden method which is not called from the TObject destructor.
> 
> Where/how is this method called in the source? I’ve been in the
> debugger for over an hour and I still can’t find it.
> 
> Regards,
>       Ryan Joseph
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to