At 2:55 PM -0800 3/9/99, Tung Bui wrote:
>I mean I would prefer two operations (new and delete) over
>four operations (MemHandleNew, MemHandleLock, MemHandleUnlock and
>MemPtrFree) since it is simpler to allocate and deallocate memory the C++
>way.

You might consider MemPtrNew and MemPtrFree.  If you're going to allocate
then immediately lock a handle, and only unlock it right before you free
it, then you should use a fixed chunk (pointer) instead.  ...now you're
back to just 2 operations.

I don't know how the C++ compiler implements new/delete, so I can't say
whether that's better or worse than using MemPtrNew/MemPtrFree.

                        --Bob


Reply via email to