Jake Donham wrote: > > I don't think you can call a C++ constructor like that--think you need to > overload the placement new operator to explicitly construct memory.
No need to overload it, just call it:
if (MemHandle h = MemHandleNew(sizeof(MyClass)))
{
MyClass *c = new (MemHandleLock(h)) MyClass;
// use *c
c->~MyClass();
MemHandleUnlock(h);
MemHandleFree(h);
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/
