Function _conNew() Foundation
Copies a container or produces a NIL container.
ContainerHandle _conNew(ContainerHandle chx);
Returns the handle of the container created or the value NULLCONTAINER when an error has occurred.
A new container is created with _conNew(). If the parameter has the value NULLCONTAINER, a NIL container is created. If the parameter is the handle of an existing container, a copy of this container is made.
Each container created with _conNew() or another _conNew...() function must be released with _conRelease() when it is no longer needed. If it is not released, memory space is lost which can not be recovered by the garbage collector.
/*
Produces a new NIL container
*/
#include <xppcon.h>
ContainerHandle hNew;
XPPAPIRET xr;
hNew = _conNew(NULLCONTAINER);
if (hArray == NULLCONTAINER)
{
xr = _conLastError();
/* ... error handling */
}
else
{
/* ... operations with the Nil container */
_conRelease(hNew);
}
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.