OCI Bind Handle... Is it really deallocated with the statement handle?

From: Mohan V <v.mohan_at_blr.spcnl.co.in>
Date: 18 Jul 2001 03:51:33 -0700
Message-ID: <ea5471d2.0107180251.561a78ba_at_posting.google.com>


hello all,

        I am writing an OCI application and there seem to be memory leaks in some of my functions...

I have good reasons to suspect that the cause of the leak is this OCI function...

                        OCIBindByName()

This is what the Oracle Doc says about the function...

OCIBindByName()
Purpose
Creates an association between a program variable and a placeholder in a SQL statement or PL/SQL block.
Syntax

sword OCIBindByName ( OCIStmt       *stmtp,
                      OCIBind       **bindpp,
                      OCIError      *errhp,
                      CONST text    *placeholder,
                      sb4           placeh_len,
                      dvoid         *valuep,
                      sb4           value_sz,
                      ub2           dty,
                      dvoid         *indp,
                      ub2           *alenp,
                      ub2           *rcodep,
                      ub4           maxarr_len,
                      ub4           *curelep,
                      ub4           mode );
Parameters
stmtp (IN/OUT) - the statement handle to the SQL or PL/SQL statement being processed.

bindpp (IN/OUT) - an address of a bind handle which is implicitly allocated by this call. The bind handle maintains all the bind information for this particular input value. The handle is freed implicitly when the statement handle is deallocated. On input, the value of the pointer must be NULL or a valid bind handle.

.....

In my code, i am just freeing the statement handle and not the bind handle...
I suspect that the bind handle is not being deallocated as the documentation says it should be...

Can anyone out there help me out?
Is this a known bug in the OCI libraries? Has anyone else encountered this problem?

Please help me out!

Thanks!

-mohan

Never imagine yourself not to be otherwise than what it might appear to
others that you were or might have been not otherwise than what you had
been would have appeared to them to be otherwise.
- From "Alice in Wonderland"
Received on Wed Jul 18 2001 - 12:51:33 CEST

Original text of this message