<[EMAIL PROTECTED]> wrote
> Right now I'm maintaining a linked-list to remember all the handles that
> were created, each piece of the list taking an additional 96 bits (of
> locked memory), I'm not being very memory efficient here.
>
Can you allocate an array of handles? This needs a bit of code
to manage it, but avoids the allocation overhead and heap fragmentation
of a linked list. Even if you don't know how many handles you'll need
it's not hard to allocate a fixed block of, say, twenty handles and then
resize the chunk by a fixed amount when you've used those handles.
This means that you can unlock and release the handles and then the
array itself in response to the form close event.
Although I've got a sneaking suspicion that I'm forgetting something.
Chris Tutty
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/