Graeme Geldenhuys wrote on do, 19 nov 2009:
Jonas Maebe wrote:
Delphi compatibility. And Delphi does that because COM requires this
behaviour.
Can't that behaviour be limited to Windows platform only.
It would change the behaviour of code between Windows and non-Windows
platforms. One thing it would certainly affect is assembler code.
More importantly, another thing it would affect is that in case
someone has written their own fillchar with an out parameter, and
*expects* reference counted structures to be finalised at the caller
side before they are overwritten with zeroes by their routine.
Changing that behaviour woud
a) result in memory leaks when using such a routine
b) not be fixable without manually adding finalize calls everywhere
this custom fillchar routine is called, since the required typeinfo is
not available at the callee side
Such behaviour & implementation just doesn't seem right for a project
that prides itself by being a cross-platform compiler (project).
Cross-platform also means having the same behaviour on different platforms.
Jonas
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel