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

Sven Barth pascaldragon at googlemail.com
Wed Apr 13 21:57:21 CEST 2016


On 13.04.2016 19:50, Florian Klämpfl wrote:
>> As I wrote in another mail a good solution would probably be for these
>> kind of global variables to be initialized after all initialization
>> sections have run and to have that documented like that. This way we
>> avoid adding *another* potential pitfall with unit initializations.
>> Functions that use such global variables could have a flag added which
>> gets added recursively and thus we could warn in the initialization
>> sections if such routines are used nevertheless.
>> The latter could be also done in case we indeed don't do anything
>> special with these records. This way the user would at least be warned...
> 
> Just make a simple rule: custom managed types are initialized directly before or after (to be
> defined but I prefer before) the initialization part of the unit is run.

Fine.

Regards,
Sven




More information about the fpc-devel mailing list