[fpc-pascal] How to free this memory and avoid memory leak

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Oct 8 16:23:25 CEST 2009


2009/10/8 Jonas Maebe <jonas.maebe at elis.ugent.be>:
> Also, as you can see the program does not really depend on the data being
> actually stored in a dynamic array. So you could just as well use "tocarray:
> ^Int32" and assign it the value of p (as you pretty much did until now).

Ah! That is what I wanted to do in the first place, but I obviously I
didn't get the ^int32 syntax correct.

It now works perfectly, without the need of the local array. :-)  And
more importantly, no more memory leak. ;-)

Thanks Jonas.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list