At 12:03 PM -0500 12/2/99, McCollister, Mike wrote:
>I am creating a structure using MemPtrNew. However, I noticed that with an
>extra variable and an extra step that I can use MemHandleNew and then
>MemHandleLock to get the pointer. What are the advantages of using one
>method over the other?
The advice I've heard is to use MemPtrNew rather than MemHandleNew followed by
MemHandleLock for allocating chunks which can't be moved during their lifetime. The
reason is that they're allocated at the opposite end of the heap. Of course if the
chunk needn't be locked for its entire life, it's usually better to use a handle.
-
Danny Epstein, Applied Thought Corporation
Have friends with Palm organizers? Get BeamBooks!
http://www.appliedthought.com/beambooks