This discussion is archived
1 Reply Latest reply: Dec 19, 2012 1:09 AM by prajithparan RSS

Do I need to delete each item before freeing OCI Table?

792937 Newbie
Currently Being Moderated
Hi,

I had a 7*24 OCI app which memory keeps growing. I am currently debug it and find there is a table that I created using
retStatus = OCIObjectNew(m_pOCIEnv, m_pOCIError, m_pOCISvcCtx, OCI_TYPECODE_TABLE,
                                             (OCIType *)param.b_pvType, (void *)0, OCI_DURATION_DEFAULT, TRUE, (void **)&param.b_pvValue);

and I puts lots of Type object into this collection.

And when I delete the table, I used the following function:
retStatus = OCIObjectFree(m_pOCIEnv, m_pOCIError, param.b_pvValue, OCI_TYPECODE_TABLE);

I thought the collection takes a continieous memory which can be freeed by the above statement.

Do I neet to delete each item before calling the OCIObjectFree as follows?
retStatus = OCITableDelete(m_pOCIEnv, m_pOCIError, i, (OCITable *)param.b_pvValue); // i is the index of the item.

Regards,
-Bruce

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points