You should not be calling MemHandleFree(recH), as to the fact that the data is in DB form. You should not be freeing it at all just releasing it. LionScribe
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Steve K Sent: Monday, August 11, 2003 7:58 PM To: Palm Developer Forum Subject: Re: Memory Management Sorry, tabbing, got alittle screwy, and I added an extra } on accident. This is better. static void foo(FormType *frmP) { FrmSetTitle(frmP, "Test"); Err error; MemHandle recH; char* test; LocalID dbId = DmFindDatabase(cardNo, "barDB"); gDatabase = DmOpenDatabase(cardNo, dbId, dmModeReadOnly); recH = DmGetRecord(gDatabase, 0); if(recH) { test = (char*) MemHandleLock(recH); MemHandleUnlock(recH); } MemHandleFree(recH); DmReleaseRecord(gDatabase, 0, false); error = DmCloseDatabase(gDatabase); } -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
