2.4. Memory Allocation and String Values

String values for points are normally allocated on the heap. Some functions, notably PT_PointCopyValue, make this assumption and may free the string pointer or allocate space for a new value. This is not true for a point name. The programmer must control the memory associated with the point name in the PT_stCPOINT structure.

[Important]

Zeroing an entire point structue (ie. setting all field values to 0) for points of type PT_TYPE_STRING will create a memory leak.