Each answer raises another question...
In my case, it's only a small amount of memory - 32 Booleans - and it would
be handy to have them set when the program starts, and survive during the
duration of the app running. So maybe a global array w/b appropriate. In
that case, I would guess that I should use a MemHandleNew for it, and lock
it only when I need to write to it (during AppStart, probably) or read from
it (just few places in the program), then MemHandleFree it when the app
terminates. Would you agree?
Thanks again - your quick and helpful replies are very much appreciated!
Brian
> -----Original Message-----
> From: Richard Burmeister [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 07, 2001 11:03 AM
> To: Palm Developer Forum
> Subject: RE: Handles and pointers - basically interchangeable?
>
>
> > From: Brian Smith
> >
> > Would you say that the life of a form, which serves as
> > a "main menu" to get to the rest of the program's
> > functions, is a "short duration?" While the program
> > is being actively used, this form won't be up for very
> > long at all.
> > But if the user starts the app, then doesn't start using
> > it right away, the form could be the active form for
> > quite a long time. (Once again, "what is the sound of
> > one man answering his own question?"....)
> >
>
> It isn't likely that you are going to actually delete the
> main form while
> your app is running (even though it won't be the active form
> all the time).
> So if you are storing something in memory that isn't a part
> of the form, but
> must be available when the form exists, then you would want to use a
> MemHandleNew (and lock it only when you need it) so the OS
> can move the
> memory if it needs to. (Unless it is just a tiny bit of
> memory, in which
> case a global variable might be appropriate.)
>
>
> --
> 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/