Graeme Geldenhuys schrieb:
> Hi,
> 
> Which of these should I use in new projects? I read somewhere that
> GetMem/FreeMem is actually compatibility methods from Turbo Pascal
> days, yet I have seen lots of new code that uses it, so I guess it's
> still ok to use?

GetMem/FreeMem are lower level than new/dispose. Use New/Dispose as much
as possible.

> 
> I have various complex structured types and pointers to those types.
> Will New() and Dispose() automatically know what size to allocated and
> deallocate, seeing that it doesn't have a Size parameter?

Yes. It initializes/finalizes even automated types what Get/FreeMem
doesn't do.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to