Hi Ben. Thanks for your answer. Is it only sysAppLaunchCmdNormalLaunch that have normal global variable initialization? I don't think the Palm OS SDK is very clear on this matter, or I havn't looked at the right place. Where can I find more detailed information about what is allowed under the different launch codes?
I've read about the new feature in CW8 called expanded mode. Would this mode allow the use of virtual function tables when the launch code is sysAppLaunchCmdSystemReset, i.e. the code in my example would run fine? Kind regards, Ola Theander > -----Original Message----- > From: Ben Combee [mailto:[EMAIL PROTECTED]] > Sent: den 17 oktober 2001 14:34 > To: Palm Developer Forum > Subject: Re: Prblm: Why does this simple code crash when the > application > i s in itiated with sysAppLaunchCmdSystemReset? > > > "Ola Theander" <[EMAIL PROTECTED]> wrote in message > news:65267@palm-dev-forum... > > > > Hi Scott. > > > > You're absolutely right. Thank you for your clarification. > But what's > the > > reason for not initializing global variables if the heap is > available? > > Global variables are referenced using the A5 register which is set at > application startup. In a sublaunch or notification > situation, Palm OS > doesn't setup A5 because of the time and memory required -- you may be > very low on dynamic heap space, for example, and not have room for the > sublaunched application's global variables. > > > > -- > For information on using the Palm Developer Forums, or to > unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
