"LarryLu" <[EMAIL PROTECTED]> wrote in message
news:41944@palm-dev-forum...
>
> Hi
>
> Does anyone know how you would/could create an app that
> deletes itself.

One method would be to copy the code that runs DmDeleteDatabase into a
MemPtrNew allocated-block which you would goto directly using inline
assembly from your Main() routine.  Your code could also go on a block on
the stack -- that would prevent a memory leak, although the leak isn't
really there since the block would be freed by the system anyway.

Actually, it probably would be better to have that code launched from a
separate launch code with a replacement of the startup code library -- you
don't want to return to anything but the PalmOS system after your DB is
deleted.  You could also wait for PalmOS 4.0 which lets you set the database
attribute dmHdrAttrRecyclable on your program, which causes it to be deleted
when closed.

--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>



-- 
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