[fpc-devel] Initialize/Finalize management operators and Default intrinsic

Sven Barth pascaldragon at googlemail.com
Mon Apr 11 14:38:50 CEST 2016


Am 11.04.2016 08:37 schrieb "Maciej Izak" <hnb.code at gmail.com>:
> Thanks for introduction. Workaround is not a case, eventually patch to
fix order of class constructor/destructor and variable implicit
initialization/finalization (as mentioned in
http://bugs.freepascal.org/view.php?id=29245 ). Anyway I do research in
this direction to cover all possible usage of new operators (seems like
Default intrinsic is the last one).

There is another problem that occurred to.me after my previous mail. Have
you ever heard of the "static initialization order fiasco"? I've stumbled
upon that a few weeks ago at work with C++ and was glad that we don't have
that problem in Pascal, but with the new management operators and the need
to have global variables be initialized correctly as well this would change
- which would be very bad as this is a hard to debug problem.
I'll provide you with an example when I'm back home again in the evening.

> Sven, could you look at topic "Management operators AddRef and Copy vs
Copy" thread? New operators are ready for test in branch, anyway we can
adjust the naming of AddRef and Copy. Florian proposed "Clone" (instead of
Copy) and "Copy" (instead of AddRef).

I've yet to find a quiet minute to digest that one :P

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160411/dd053398/attachment.html>


More information about the fpc-devel mailing list