Skip to Main Content

Berkeley DB Family

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Debug Assertion Failed while using Db::stat()

633562May 8 2008 — edited May 9 2008
Hi All-

I'm using MS Visual C++ 6.0 on Win XP. Getting "Debug Assertion Failed" dialog with the following info:

File: dbgheap.c
Expression: _CrtIsValidHeapPointer(pUserData)

This happens when I try to free() the memory. Here is the code:

DB_BTREE_STAT* sp = NULL;
if ((m_pdbWK->stat(NULL, &sp, DB_FAST_STAT) == 0))
{
// Do something with sp
}

if (sp) free(sp); //

My question is, am I not supposed to free this memory? I have a feeling since no user defined malloc function is defined, maybe this is free() is not needed.

Can anybody please tell me what is going on?
Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 6 2008
Added on May 8 2008
1 comment
1,329 views