[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


NAME
    FreeRemember -- Free memory allocated by calls to AllocRemember().

SYNOPSIS
    FreeRemember( RememberKey, ReallyForget )
                  A0           D0

    VOID FreeRemember( struct Remember **, BOOL );

FUNCTION
    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.

INPUTS
    RememberKey = the address of a pointer to struct Remember.  This
       pointer should either be NULL or set to some value (possibly
       NULL) by a call to AllocRemember().
    ReallyForget = a BOOL 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.

EXAMPLE
    struct Remember *RememberKey;
    RememberKey = NULL;
    AllocRemember(&RememberKey, BUFSIZE, MEMF_CHIP);
    FreeRemember(&RememberKey, TRUE);

RESULT
    None

BUGS

SEE ALSO
    AllocRemember(), exec.library/FreeMem()


[Back to Amiga Developer Docs]