2018-03-08 7:48 GMT+01:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>:
> You could use an include file containing both the declaration and > implementation controlled by compiler defines together with a macro for the > type name. > Very improper and totally bad approach. This is for sure not the right direction for further usage of management operators. > No, this doesn't beg the question, because Object Pascal classes are > designed in the principle to reduce on the heap. Changing this would not > only mean quite some changes in the compiler/RTL with no real gain, but it > would also change a core aspect of the Object Pascal language. > classes with auto free has a lot of sense (without modifying classes design related to usage of heap), anyway old modes should stay untouched, and the new feature should have no negative influence on performance for RTL and Object Pascal. Because of legacy of all FPC modes the topic is a little complicated but IMO is possible to achieve (for such feature new mode should be introduced [and maybe modeswitch]). -- Best regards, Maciej Izak
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal