[fpc-pascal]Pointer Help

James Mills prologic at prologitech.com
Sun Feb 9 13:29:21 CET 2003


On Sun, Feb 09, 2003 at 03:12:07PM +0100, Anton Tichawa wrote:
> On Sunday 09 February 2003 12:54, you wrote:
> 
> > freeMem(tmpStrings, sizeOf(String) * (N));
> 
> No, only:
> 
> freeMem(tmpStrings);

But getMem and reAllocMem allocate a number of bytes on the heap,
wouldn't you have to free that number of bytes using freeMem(pointer, n)
?

cheers
James

Btw, I'm using short strings, so I think it'll be ok for now...

> 
> Read the Manual - Free Pascal Programmer's Manual, Section 4.5, "Writing Your 
> Own Memory Manager" - because that's what you're actually doing.
> 
> HTH
> 
> Anton Tichawa.
> 
> 
> 
> ----------
> 
> "Adas Methode war, wie sich zeigen wird, Tagtr?ume in offenbar korrekte 
> Berechnungen einzuweben."
> 
> Doris Langley Moore: Ada, Countess of Lovelace (London 1977).
> 
> ----------
> 
> Anton Tichawa
> Volkertstrasse 19 / 20
> A-1020 Wien
> mobil: +43 664 52 07 907
> email: anton.tichawa at chello.at
> 
> ----------
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list