How to free an Oracle Object-Type passed to an external procedure

Posted by chila on Stack Overflow See other posts from Stack Overflow or by chila
Published on 2010-04-26T18:31:14Z Indexed on 2010/04/26 18:33 UTC
Read the original article Hit count: 210

Filed under:
|
|

I'm using OTT to pass and load an Object Type from a C++ external procedure. The problem I have is that I don't know how to somehow mark the object for deallocation once extproc has done marshalling it. The object remains in extproc's memory forever making it grow in memory consumtion. Here's part of the code:

void decodeFromBuffer(OCIExtProcContext *ctx, GPRS_GPRSCHARGINGRECORD *record, GPRS_GPRSCHARGINGRECORD_ind *recordInd,
    const unsigned char *buffer, int buffLen, OCIInd *bufferInd)
{
.
.
.
assert(OCIExtProcGetEnv(ctx, &envh, &svch, &errh) == OCI_SUCCESS);
recordInd->_atomic = OCI_IND_NOTNULL;
// somehow I should mark the object for deallocation after extproc has done marshalling it

// using OCINumberFromInt and OCIStringAssignText to load the object (this memory is never deallocated)
.
.
.
}

How could I mark the object (and subobjects) for deallocation?

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about oci