At 09:30 AM 7/29/2004, you wrote:
>Yes. When you pass a pointer to SysUIAppSwitch, you've given control of it
>to the OS, and the OS is responsible for deallocating it. That's why it's
>important to set the owner to 0 -- otherwise, the system routine that frees
>all of the memory allocated by a program when it ends would free this block
>before the new program is called.

Yes. Other than using MemPtrSetOwner(ptr, 0), is there any other way to disable the OS from freeing the memory allocated by a program when it ends?

No. This memory free is done as a standard part of the OS's application-switch code.






-- Ben Combee, DTS technical lead, PalmSource, Inc.
   "Combee on Palm OS" weblog: http://palmos.combee.net/
   Palm OS Dev Fourm Archives: http://news.palmos.com/read/all_forums/



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

Reply via email to