Skybuck Flying a écrit :
Hello,
Does GetMem care about the memory contents of the pointer variable ?
If not the parameter should be out instead of var to prevent the
following hint message:
GetMem( node, sizeof(Tnode) );
Y:\Free Pascal\Units\Technical\TnodeList\version 0.08 port to free
pascal\unit_TnodeList_version_009.pas(1015,3) Hint: Variable "node" does
not seem to be initialized
GetMem could fail if out of memory, Delphi raises an OutOfMemory Exception.
What does Free Pascal do ?
I believe it depends on the global variable "ReturnNilIfGrowHeapFails".
When it is false, FPC behaves like Delphi.
mm
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal