Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Technical Reference - <b>_xfree()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _xfree()
 Free allocated memory
------------------------------------------------------------------------------
 C Prototype

     #include "fm.api"
     void _xfree(
                  void far * vlpMem
                )

 Arguments

     vlpMem is a far pointer to memory allocated with _xalloc() or
     _xgrab().

 Returns

     _xfree() has no return value.

 Description

     _xfree() releases memory allocated by _xalloc() or _xgrab().  Note that
     the pointer returned by _xalloc() or _xgrab() must be passed as the
     argument to _xfree().

     Note:  In Fm.api, _exmback() is defined (using #define) to _xfree()
     to maintain compatibility with Summer '87.

 Examples

     .  From C:

        char *mem;
        mem = _xgrab(320);
        _xfree(mem);

     .  From Assembly language:

        EXTRN __xgrab:FAR
        EXTRN __xfree:FAR
              mov   ax, 320
              push  ax
              call  __xgrab            ; pointer in DX:AX
              add   sp, 2              ; reset stack pointer
              push  dx
              push  ax
              call  __xfree            ; give it right back
              add   sp, 4

 Files  Library is CLIPPER.LIB, header file is Fm.api.


See Also: _xalloc() _xgrab()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson