On 09/25/2014 11:55 AM, Sven Barth wrote:


Why should it? When the reference count is decreased to zero (and thus the final reference on the instance is gone) the destructor method is executed (which is just a "obj.Destroy;"), simple as that (in reality it's a bit more complex, but that's an implementation detail).

Nice.

I already used "locally anonymous" Objects created by one thread and freed by another after a certain procedure had been called to implement inter-Thread events. Maybe with ref-Counted Objects this can be done in a more sexy way.

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

Reply via email to