[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)


Free memory allocated by calls to AllocRemember().


Source position: intuition.pas line 3255

procedure FreeRemember(

  var RememberKey: PRemember;

  ReallyForget: LongInt





The address of a pointer to struct Remember. This pointer should either be nil or set to some value (possibly nil) by a call to AllocRemember().



A LongBool False or True describing, respectively, whether you want to free up only the Remember nodes or if you want this procedure to really forget about all of the memory, including both the nodes and the memory buffers referenced by the nodes.


This function frees up memory allocated by the AllocRemember() function. It will either free up just the Remember structures, which supply the link nodes that tie your allocations together, or it will deallocate both the link nodes AND your memory buffers too.

If you want to deallocate just the Remember structure link nodes, you should set the ReallyForget argument to False. However, if you want FreeRemember() to really deallocate all the memory, including both the Remember structure link nodes and the buffers you requested via earlier calls to AllocRemember(), then you should set the ReallyForget argument to True.

Note well: Once you call this function passing it False, the linkages between all the memory chunks are lost, and you cannot subsequently use FreeRemember() to free them.


  RememberKey: PRemember;
  RememberKey := nil;
  AllocRemember(@RememberKey, BUFSIZE, MEMF_CHIP);
  // ...
  FreeRemember(@RememberKey, TRUE);

See also



Allocate Memory with tracking to make freeing easy.



Free a memory block with given size

Documentation generated on: 2017-01-10