Name
XtNew — allocate storage for one instance of a data type.
Synopsis
type ∗XtNew(type)
type;
Arguments
typeSpecifies a previously declared data type.
Description
XtNew is used to allocate storage for one instance of a data type. It returns a pointer to the allocated storage. For example, XtNew (XtCallbackList) allocates storage for one callback list structure.
If there is insufficient memory to allocate the new block, XtErrorMsg terminates execution.
XtNew is a convenience macro that calls XtMalloc with the following arguments specified:
( (type ∗) XtMalloc( (unsigned) sizeof(type) ) )
To copy an instance of a string, use XtNewString.