On 06 Apr 2010, at 04:49, Frank Heckenbach wrote:
Jonas Maebe wrote:
Note that FPC also frees memory in this case. It's just that new() and dispose() a) are supposed to be used in pairs, but since new(pointer) does not really make sense (FPC translates it into getmem(p,0) in TP and Delphi modes)
GPC rejects "New (untyped-pointer)". What does TP do?
It allows it, which is why FPC allows it in TP and Delphi modes (albeit with a warning). FPC also rejects it in other modes.
Jonas