Michal--that's a good idea, and I have now played quite a bit with the new operator today. But I'm having trouble with operator new[] and delete[]. I have found lots of advice on-line on how to override new and delete, but I haven't found any samples of how to override new[] and delete[] on-line or in Stroustrup's book. Do you have example implementations you could share with me?

That said, I have written an experimental version of new[]. If it's right, then my app is exiting as soon as I try to allocate a block that takes my total allocations above 200,000 bytes (not 200KB -- 200,000). Does this ring any bells with anyone as a limitation that might have been present in OS 4?

Thanks.

Michal Seliga wrote:

Maybe you app is exting at this moment. Question is just why...


because when you use new and there is no free memory it just exits your
application. i fought a lot with this...

to fix it you must override new operator so it won't cause exception but return
NULL instead (or catch the exception)


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

Reply via email to