> What is the prefered method for allocating memory on the heap dynamically > for objects created with C++? Right now I use the keyword new. Is it > better to use MemHandleNew? If so, how would you do this? Thanks.
My limited understanding of Palm memory is that MemHandleNew allocates the memory in storage memory, not on the heap. There's generally much more storage memory available than heap (e.g., on an 8Mb device, only 256Kb may be heap and the rest is storage), so the advantage of using MemHandleNew is there's more memory available to you. If your program is not very memory intensive, than you can just use "new" and the heap.
Nope. MemHandleNew and MemPtrNew both allocate memory in the dynamic heap. DmNewHandle and FtrPtrNew allocate storage heap memory. The advantage of MemHandleNew is that you can have memory that's unlocked and can be moved around by the system to avoid fragmentation.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
