[fpc-pascal] Questions regarding arrays
Reimar Grabowski
reimgrab at web.de
Thu Sep 23 01:39:34 CEST 2010
On Thu, 23 Sep 2010 00:49:29 +0200
Michael Müller <mueller_michael at alice-dsl.net> wrote:
> Another problem is often to free memory in Pascal that was allocated by C.
Having done some interaction with C libs IMHO the best option is not to free the memory in pascal at all but doing it with the provided C functions (if the lib does not do the freeing automatic, that is).
In cases like Graemes I always used leledumbos approach which never failed me.
type
PAtom = ^TAtom;
PPAtom = ^PAtom;
This gives you access to the array but the memory management is done entirely by the lib/C-code.
hih
R.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
More information about the fpc-pascal
mailing list