#include <cx/DataOps.h> void *cxDataObjNew( const char *typename )
integer function cxDataObjNew( typename ) character * (*) typename
Only the base structure is created by cxDataObjNew. For example, given a type name of "cxLattice", cxDataObjNew will return a pointer to a cxLattice structure. The ndim, data, dims, and coord fields will be 0 or NULL. Additional memory allocation for arrays is done with cxDataMalloc, cxDataCalloc, and cxDataRealloc. The data's reference count will be 0; the allocation routine should NOT increment the reference count.
Data structures are allocated from a shared memory arena. This shared memory is a limited resource, so it is possible for the memory to be exhausted, causing the allocation routine to fail.
See cxDataManAbortOnError for more details on writing portable module code that copes well with limited memory.
Use cxDataFree to free regular memory, and cxDataRefDec to free any reference-counted structures.
cxDataManAbortOnError, cxDataMalloc, cxDataCalloc, cxDataRealloc, cxDataFree, cxDataRefDec