MemPtrNew in C, "new unsigned char" in C++, do a straight byte-for-byte copy of the data, then cast it as you need it, perhaps ? I'm not sure this will solve your problems, and you may get struct alignment problems. It was just a suggestion.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Nicolás Balparda Bossi Sent: 17 February 2006 17:35 To: Palm Developer Forum Subject: RE: Database HELP! Yes, I know, me again, I am a pain in the .... How can I copy the data into the heap? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Birdsall Sent: Viernes, 17 de Febrero de 2006 03:27 p.m. To: Palm Developer Forum Subject: RE: Database HELP! Perhaps you need to copy the data you need to read from into heap, so you can re-use the data after you've called MemHandleFree? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Nicolás Balparda Bossi Sent: 17 February 2006 17:14 To: Palm Developer Forum Subject: RE: Database HELP! Yes, I've checked that the memory leaks are from my database. The thing is that if a do a MemHandleNew and then need to "free" it up, and when I do that I lose my data. If I don't I get the memory leak. Does anyone have an example where the database uses Char*? I'm really losing all hope :( Nicolas -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Morris Sent: Viernes, 17 de Febrero de 2006 03:04 p.m. To: Palm Developer Forum Subject: Re: Database HELP! If you are using the emulator you should get are report of leaks in the log file. Have you verified that the memory leaks are related to your database code and not your UI or other code? There are plenty of areas that could cause memory leaks. If you KNOW which section of code is responsible have you posted it? Nicolás Balparda Bossi wrote: > I've read that article and follow the same steps, but a memory leak > ocurred when i close the application > > ---------------------------------------------------------------------- > -- > *From:* [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] *On Behalf Of *David > Birdsall > *Sent:* Viernes, 17 de Febrero de 2006 01:49 p.m. > *To:* Palm Developer Forum > *Subject:* RE: Database HELP! > > This article may be of help: > > http://www.codeproject.com/ce/palmdb.asp > > -----Original Message----- > *From:* [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of *Nicolás > Balparda Bossi > *Sent:* 17 February 2006 15:26 > *To:* Palm Developer Forum > *Subject:* Database HELP! > > For days i've been trying to create a record to my database, and > it was completely useless. I really couldnt find any help to > explain how to create a new record without any memory leaks or any > other error. > > My structure is like this: > > struct abc > { > Char* name; > Char* username; > Char* password; > }; > > All the samples i looked at show the create record with a fixes > (array) Char. > > Could anyone give me a hint on how to do this? > > 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/ > -- > 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/ -- 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/ -- 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/
