Re: strange memory leak on Palm OS DM functions

2007-01-04 Thread Guilherme C. Hazan
Hi, Calling this after the DmSetDatabaseInfo fixes the problem: while (SysNotifyBroadcast(NULL) == errNone) ; best regards guich www.superwaba.org -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Re: strange memory leak on Palm OS DM functions

2007-01-02 Thread Dmitry Grinberg
SysAppInfoPtr appInfoP,unusedAppInfoP; SysAppInfoPtr mai=SysGetAppInfo(&unusedAppInfoP, &appInfoP); mai->memOwnerID++; ... Call Dm Calls... ... MemHeapFreeByOwnerID(0,mai->memOwnerID--); i would GUESS this would work in 68k as well... On 1/2/07, Guilherme C. Hazan <[EMAIL PROTECTED]> wrote: > >

Re: strange memory leak on Palm OS DM functions

2007-01-02 Thread Guilherme C. Hazan
HiDmitry, Ahhm can you provide a simple code? best regards guich -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Re: strange memory leak on Palm OS DM functions

2007-01-01 Thread Dmitry Grinberg
simple solution: set memory owner to a higher value then currentin the appInfo struct, then call the Dm* then call MemHeapFreeByOwnerID() On 1/1/07, Guilherme C. Hazan <[EMAIL PROTECTED]> wrote: > > Hi, > > > Same here on my Treo 650. > > Every call to DmCreateDatabase and DmSetDatabaseInfo (even

Re: strange memory leak on Palm OS DM functions

2007-01-01 Thread Guilherme C. Hazan
Hi, Same here on my Treo 650. Every call to DmCreateDatabase and DmSetDatabaseInfo (even if you don't change anything) causes a 120 byte leak. If you do it in a loop, you get a leak for each call. Yep. Wonder if it is a NVFS issue? Surely not, since it uses Dm (data manager), and TT does

Re: strange memory leak on Palm OS DM functions

2007-01-01 Thread Lionscribe
Same here on my Treo 650. Every call to DmCreateDatabase and DmSetDatabaseInfo (even if you don't change anything) causes a 120 byte leak. If you do it in a loop, you get a leak for each call. Wonder if it is a NVFS issue? Nothing to do about it, just code accordingly. LionScribe -- For info

re: strange memory leak on Palm OS DM functions

2006-12-31 Thread James Lin
Guilherme C. Hazan wrote: > > > Hi, > > I'm trying to figure why the code below produces a memory > leak: > > [... snip ...] 1. If you run your code in a loop, does it leak memory on each iteration, or is it a one-time thing? 2. Is setting the database attributes relevant? Why are you manual

strange memory leak on Palm OS DM functions

2006-12-31 Thread Guilherme C. Hazan
Hi, I'm trying to figure why the code below produces a memory leak: static Int32 getFreeMem() { UInt32 maxP,freeBytesP; // [EMAIL PROTECTED] MemHeapFreeBytes (0, &freeBytesP, &maxP); return (Int32)freeBytesP; } DWord PilotMain(Word cmd, Ptr cmdline, Word launchFlags) { if (cmd == sy