[fpc-pascal]help with pointers?
jonas at zeus.rug.ac.be
Sat Oct 20 20:29:58 CEST 2001
On Sat, 20 Oct 2001, the reverend wrote:
> so freemem(nil) will not give an error? ok. thanks. i'll just initialize
freemem(nil) will result in a run time error 204. Pascal is a language
(just like C, and for the most part C++ as well) where most memory
management is manual: you (and only you) are responsible for the proper
allocation, management and deallocation of memory for dynamic data
This means you must make sure your program can keep track in one way or
another of which pointers are already initialized and when they have to be
freed. There is no magic trick to get around this, unless you switch to
environment in which all memory management is handled for you by the run
time system (such as Java).
More information about the fpc-pascal