[fpc-devel] GetMem(SomePointer, 0) <> nil

Paul Ishenin ip at kmiac.ru
Tue Mar 1 07:32:33 CET 2011


Hello, FPC developers' list.

I noticed today that if I want to allocate 0 bytes I get not a nil but a 
valid pointer. Why?

This is incompatible with delphi. And I suppose cause crashes and memory 
leaks not only in my delphi code which I'm porting to FPC/Lazarus.

--
Best regards,
Paul Ishenin.




More information about the fpc-devel mailing list