コード例 #1
0
//-----------------------------------------------------------------------------
// dpiObjectType__free() [INTERNAL]
//   Free the memory for an object type.
//-----------------------------------------------------------------------------
void dpiObjectType__free(dpiObjectType *objType, dpiError *error)
{
    if (objType->conn) {
        dpiGen__setRefCount(objType->conn, error, -1);
        objType->conn = NULL;
    }
    if (objType->elementTypeInfo.objectType) {
        dpiGen__setRefCount(objType->elementTypeInfo.objectType, error, -1);
        objType->elementTypeInfo.objectType = NULL;
    }
    if (objType->schema) {
        dpiUtils__freeMemory((void*) objType->schema);
        objType->schema = NULL;
    }
    if (objType->name) {
        dpiUtils__freeMemory((void*) objType->name);
        objType->name = NULL;
    }
    dpiUtils__freeMemory(objType);
}
コード例 #2
0
//-----------------------------------------------------------------------------
// dpiDeqOptions__free() [INTERNAL]
//   Free the memory for a dequeue options structure.
//-----------------------------------------------------------------------------
void dpiDeqOptions__free(dpiDeqOptions *options, dpiError *error)
{
    if (options->handle) {
        dpiOci__descriptorFree(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS);
        options->handle = NULL;
    }
    if (options->conn) {
        dpiGen__setRefCount(options->conn, error, -1);
        options->conn = NULL;
    }
    dpiUtils__freeMemory(options);
}
コード例 #3
0
//-----------------------------------------------------------------------------
// dpiSodaDocCursor__free() [INTERNAL]
//   Free the memory for a SODA document cursor.
//-----------------------------------------------------------------------------
void dpiSodaDocCursor__free(dpiSodaDocCursor *cursor, dpiError *error)
{
    if (cursor->coll) {
        dpiGen__setRefCount(cursor->coll, error, -1);
        cursor->coll = NULL;
    }
    if (cursor->handle) {
        dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_DOC_CURSOR);
        cursor->handle = NULL;
    }
    dpiUtils__freeMemory(cursor);
}
コード例 #4
0
//-----------------------------------------------------------------------------
// dpiObject__free() [INTERNAL]
//   Free the memory for an object.
//-----------------------------------------------------------------------------
void dpiObject__free(dpiObject *obj, dpiError *error)
{
    dpiObject__close(obj, 0, error);
    if (obj->type) {
        dpiGen__setRefCount(obj->type, error, -1);
        obj->type = NULL;
    }
    if (obj->dependsOnObj) {
        dpiGen__setRefCount(obj->dependsOnObj, error, -1);
        obj->dependsOnObj = NULL;
    }
    dpiUtils__freeMemory(obj);
}