1 Reply Latest reply on Dec 19, 2012 9:09 AM by prajithparan

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


      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.