Hi Sven, On Sat, Sep 27, 2014 at 7:33 PM, Sven Barth <pascaldra...@googlemail.com> wrote:
> Huh? Delphi really prohibits such things inside the destructor? Would you > mind to share an example (possibly including error messages), please? > Sorry, I wasn't clear enough. With "prohibits" I didn't mean that you get a compiler error. It compiles and runs just fine but you get a stack overflow at runtime when the dest ructor is called . I've done a different approach already: the decrease helper sets refcount > to -1 directly before it calls the destructor and both the increase and the > decrease helper check for -1. Considering that it's currently only a proof > of concept I can live with the performance impact that comparison might > have. OK, but keep my proposal in mind since it has overhead only at BeforeDestruction which is once per instance lifecycle. --Constantine
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel