VSDK Test

Thomas totoole at rocko.lab.csuchico.edu
Thu Mar 10 14:38:35 CST 2005


Hi,

I'm running a simple test of the VDK using XCode 1.5.

int main (int argc, char * const argv[])
{
	ValentinaInit(3*1024*1024, "", "");
	valDB myDB;
	myDB.OpenDataBase("/Users/Name/Desktop/val_sdk_test_db");
	VDK_Cursor * myCursor = myDB.SqlSelect("select * from tbl_1");
	unsigned long rcdCnt = myCursor->GetRecordCount;
	delete myCursor;
	myDB.CloseDataBase();
	ValentinaShutDown();
}

Two things come up.

First the header indicates the cursor GetRecordCount call returns a 
ulong,
but the compiler will not assign the returned value to an unsigned long 
int.
Am I missing something obvious? Does the value returned by 
Cursor->GetRecordCount need to be dereferenced or type cast?

Second, after the ValentinaShutDown call, the runtime environment 
complains about double freeing memory at several addresses.
So I see several warnings such as the following:

*** malloc[1940]: Deallocation of a pointer not malloced: 0x1112d40; 
This could be a double free(), or free() called with the middle of an 
allocated block;

Any suggestions much appreciated.

Thomas


More information about the Valentina mailing list