Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Memory stacking on InsertRow / ReleaseRow

1009546May 17 2013 — edited May 17 2013
Hi,

we are trying to insert new rows into a Oracle 11.1.0.6 installation using OLE DB with client version 11.2.0.1.0.

The issue is: We are inserting, updating and releasing the rows but it looks like Oracle' OLE DB provider doesn't really free the rows (altough it tells us, everything is just fine). We see this by watching the RAM which constantly increases on each IRowsetChange::InsertRow call and does not lower on IRowSet::ReleaseRows call. Of course this leads to a crash as memory is not infinite.

When we disconnect from the database or release the appropriate interface pointers the occupied memory is freed.

We are using COM-ptrs for the interface - my guess is, the combination of COM-ptrs and Oracle' OLE DB driver causes this bug.


I finally brought down the issue to the following code:

// declaration
CComPtr<RowsetInterface> mpcIRowset;
CComQIPtr<IRowsetChange> mpcIRowsetChange;
CComQIPtr<IRowsetUpdate> mpcIRowsetUpdate;

[...]

mpcIRowsetChange = mpcIRowset;
mpcIRowsetUpdate = mpcIRowset;

// execution
mpcIRowsetChange->InsertRow(DB_NULL_HCHAPTER, mhAccessor, mcRowBuffer.mpcData, mrghRows); // increases memory on client side
mpcIRowsetUpdate->Update(DB_NULL_HCHAPTER, 1, mrghRows, NULL, NULL, NULL);
mpcIRowset->ReleaseRows(mulRowsObtained, mrghRows, NULL, NULL, NULL); // should decrease memory on client side (but does not do so)


Memory is freed when I do call this:
mpcIRowsetChange.Release();
mpcIRowsetUpdate.Release();
mpcIRowset.Relase();

--> which basically comes down to a disconnect to me


Data type on this insert/update/release is DBTYPE_WSTR; All function calls return no error.

Do we need to release something additionally? I've already tried to release all possible stuff but looks like only releasing the interface pointers helps.

Also note that the very same code runs just fine e.g. for MSSQL server. So we do not assume a ref counting issue solely on our side but rather due to the COM / oracle combination.


Any help or indications appreciated.

Please tell me if you need any further information.


Best regards,

Marcus

Edited by: 1006543 on 17.05.2013 03:50
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2013
Added on May 17 2013
0 comments
1,058 views