Sven Barth schrieb:

There are however some nasty problems inside constructors and destructors, because "Self" is reference counted as well (and should be after all as we don't want the instance to be destroyed behind our backs suddenly).

IMO before the end of a constructor, and before the start of an destructor, no references to the object exist at all, so that code outside these methods has no reference that could cause trouble.

It looks to me like inside methods Self doesn't deserve refcounting, because a method can be invoked only with an existing instance, which will stay alive at least until the call returns.

DoDi

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

Reply via email to