Hello again Angel. If you fail to unload a loaded library, it simply hogs a
slot in the OS's array of loaded libraries. This is what you access through
the SysLibTblEntry( UInt refNum) API, where the refNum is really just the
index of a dynamic array.
A SysLibTblEntry just consists of a few pointers, so it's not like you're
going to waste a huge amount of memory by keeping your library loaded --
you're only jeopardizing a few bytes. Only the SysLibTblEntry, and of
course the storage required on the device for the actual shared library's
PRC, are consumed when your library is loaded. Before it's loaded, just the
storage on the device for the PRC is consumed.
Not much happens when the power goes off (?).
But if you do a soft reset without having closed your shared library, it
will no longer be loaded and the SysLibTblEntry memory it was consuming will
be reclaimed by the OS. If you want your library to be loaded even after a
soft reset, you have to write a reset app. A reset launch code is sent to
all apps upon soft reset. So this is an app that exists solely to catch the
Reset launch code, and upon seeing it, SysLibLoads your library and exits.
Doing an up-arrow-reset will prevent the reset launch code from being sent,
and thus in this case your library won't be reloaded upon soft reset.
A hard reset will trash your shared library and its SysLibTblEntry, unless
it is stored in FLASH. If you implement a reset app and you want it to
persist through a hard reset, you must stick it in FLASH as well.
-Jeff Ishaq
"Angel Gutierrez" <[EMAIL PROTECTED]> wrote in message
news:22645@palm-dev-forum...
>
> We need to create a shared library which once it is loaded, it will
> remain loaded at all times.
>
> We are assuming that not unloading the library will not create any
> problem, since the library will be removed when the power goes off. Is
> our assumption correct?
>
> We will appreciate your comments.
>
>
> Angel
>
>
> *************************************
>
> Angel Gutierrez
>
> Department of Computer Science
>
> Montclair State University
>
> Upper Montclair, NJ 07043
>
> Phone: (973) 655 - 5161
>
> Fax: (973) 655 - 4164
>
> E-mail address:
>
> [EMAIL PROTECTED]
>
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/