In this case, no need to free the pointer.  Once you set the ownership to
the OS, the OS will clean it up.

Michael Yam
www.ytechnology.com


Brad Myers <[EMAIL PROTECTED]> wrote in message
news:27684@palm-dev-forum...
>
> Here is a related question on : when I use SysUIAppSwitch to launch
> another application, and I want to pass a parameter, I am successfully
> using:
>
> p = MemPtrNew(len+1);
> ... set p ...
> err = MemPtrSetOwner (p, 0);
> err = SysUIAppSwitch (0, localid, sysAppLaunchCmdNormalLaunch, p);
>
> to pass p to the other application as the parameter. Do I ever need to
> MemPtrFree(p)? I tried to free p at the exit of the other application,
> but that caused a system crash. Since this memory is owned by the OS, I
> am worried that a space leak will never get cleaned up automatically.
>
> Thanks,
> Brad Myers
>
>



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

Reply via email to