> How does anyone write any sharable code with accessor functions on the
> Palm? None of the options that come to mind are palatable:
>
> 1) Use non-movable memory chunks for highly dynamic objects.
> 2) Make the caller do her own locking/unlocking. While macros or
defines
> could optimize this out for every platform but the Palm, the ugliness
and
> programmer pain would be extremely high.
> 3) Make local copies of everything, and give back pointers to the
local
> copies. Now the caller again has to do something odd (free the local
copy
> when done), and performance goes down to abysmal levels.

In C++ code I was writing, I basically did #2, making a template class
which held a lock pointer to memory which unlocked upon its destruction.

--
Ben Combee, [EMAIL PROTECTED]
Techwood Broadcasting Foundation, Austin Bureau



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