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 . Guide To CA-Clipper - <b>gfnterase()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 GFNTERASE()
 Erase a font from memory
------------------------------------------------------------------------------
 Syntax

     GFNTERASE(<aFont>) --> NIL

 Arguments

     <aFont> is a pointer to the VMM region where the .FND font is
     loaded.  <aFont> would have been created with an earlier call to
     GFNTLOAD().

 Returns

     GFNTERASE() always returns NIL.

 Description

     GFNTERASE() erases a specified font from memory.  Since CA-Clipper is
     unable to reallocate the memory occupied by a loaded font (i.e., no
     automatic garbage collection), it is your responsibility to release this
     memory.  This can be done with the following:

     aFont2Erase := GFNTERASE(aFont2Erase)

 Examples

     .  This example loads a Font file called MyFont .FND:

        FUNCTION ShowOneFont (cString)
           LOCAL aFont
                    // Load a specific font file into memory
           aFont := GFNTLOAD("MyFont.FND")

                    // Display cString using the loaded font
           GWRITEAT(X , Y , cString, nColor, LLG_MODE_SET, aFont)
           // *Important*  You must erase the font from memory if it is

           // no longer used.  This is because CA-Clipper's VMM is

           // unable to automatically free the memory occupied by aFont.
           GFNTERASE(aFont)
           RETURN NIL

 Files   Library is LLIBG.LIB, header file is Llibg.ch.


See Also: GFNTLOAD() GFNTSET()

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