Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtFree(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtCalloc(1)

XtErrorMsg(1)

XtMalloc(1)

XtNew(1)

XtNewString(1)

XtRealloc(1)

 

Name

XtFree — free an allocated block of storage. 

Synopsis

void XtFree(ptr);

  char ∗ptr;

Arguments

ptrSpecifies a pointer to the block of storage to be freed. 

Description

XtFree returns storage previously allocated by XtCalloc and XtMalloc and allows it to be reused.  If ptr is NULL, XtFree returns immediately. 

Calling the Toolkit’s XtMalloc and XtFree is more portable and provides better error checking than calling system-specific malloc and free.  Deallocating blocks of memory not allocated by XtMalloc would be disastrous. 

XtNew and XtNewString provide slightly higher-level approaches to memory allocation. 

See Also

XtCalloc(1), XtErrorMsg(1), XtMalloc(1), XtNew(1), XtNewString(1), XtRealloc(1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026