Ok, i find the solution to the previous error. But now i'm getting memory leaks, how can i fix this? I really don't understand how these happen.
 
Can you help me?
 
Regards
 
Nicolás


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicolás Balparda Bossi
Sent: Jueves, 16 de Febrero de 2006 02:45 p.m.
To: Palm Developer Forum
Subject: Database closure

Hi, i'm getting some problems when i exit the application.
 
There is a message telling me: "datamgr.c, Line:8680, Records left busy in closed unprotected DB"
 
For every DmGetRecord i do, i then call he DmReleaseRecord function. And for every MemHandleLock, i then call MemHandleUnlock.
 
I enclose a piece of my code to see if someone can help me
 

Err error;

UInt32 tamanio;

MemPtr pointer;

MemHandle recordHandler;

ptrConfiguracionUPN configurationVieja;

configuracionUPN configurationNueva;

tamanio = StrLen(nuevoPassword) + 1;

recordHandler = DmGetRecord(dataBase,indexUPN);

if(recordHandler)

{

pointer = MemHandleLock(recordHandler);

configurationVieja = (ptrConfiguracionUPN)pointer;

configurationNueva.username = (Char*)MemPtrNew(StrLen(configurationVieja->username)+1);

configurationNueva.password = (Char*)MemPtrNew(tamanio);

configurationNueva.name = (Char*)MemPtrNew(StrLen(configurationVieja->name)+1);

StrCopy(configurationNueva.username,configurationVieja->username);

StrCopy(configurationNueva.password,nuevoPassword);

StrCopy(configurationNueva.name,configurationVieja->name);

error = DmWrite(pointer,0,&configurationNueva,sizeof(configurationNueva));

MemHandleUnlock(recordHandler);

DmReleaseRecord(dataBase,indexUPN,true);

}

 
Thanks
 
Nicolás
--
For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
--
For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to