Syntax
FreeText(Text)
Description
Releases the resources associated with a text object previously created with CreateText().
Parameters
Text
The handle of the text object to free.
Return Value
This function does not return a value.
Remarks
It is important to free text objects when they are no longer needed to prevent memory leaks and release graphics resources (like font formats and text layouts). After calling this function, the text handle is invalid and should not be used.
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MyText = CreateText("Temporary Text", "Arial", 12)
If MyText
Debug "Text object created."
; Use the text object...
; DrawTxt(MyText, ...)
FreeText(MyText)
Debug "Text object freed."
MyText = 0 ; Good practice
Else
Debug "Failed to create text object."
EndIf
StopProGUI()
See Also
Supported OS
Windows, Linux