CW should allow C++ - why don't you use it? (I personally do not, but if
there was a legacy C++ code, I would consider this option.)

> Is 'new' is equal to MemPtrNew and is "delete" is equal to MemPtrFree()?

'new', resp. 'delete' run additionally class constructor/destructor.

> Can I free memory using 'delete', if it is set with MemPtrNew() or
MemGluePtrNew?

Not a wise policy. Even if the destructor was empty, you can expect problems
in the future.


Regards,
    Jan Slodicka

----- Original Message ----- 
From: "Stanislav Borisov" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Friday, August 12, 2005 11:01 AM
Subject: Re: Simple question about how to increase stack size


> Thanks for your help,
>
> I found one place in my code where I'm trying to free already freed
pointer using MemPtrFree(), but I have some questions about freeing memory:
> Is 'new' is equal to MemPtrNew and is "delete" is equal to MemPtrFree()?
>
> Can I free memory using 'delete', if it is set with MemPtrNew() or
MemGluePtrNew?
>
> I'm asking that becouse I have ported one Windows application to Palm, and
there new and delete are used.
> I think if you try to free already freed pointer with 'delete', there will
be no error. Am I right?
> -- 
> For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/


-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to