Thanks!. Can you allocate more than 64*1024L with this method?
-----Mensaje original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Ben Combee Enviado el: Mi�rcoles, 23 de Junio de 2004 03:43 p.m. Para: Palm Developer Forum Asunto: Re: difference At 11:29 AM 6/23/2004, you wrote: >Which is the difference between > >MemPtr Pointer=MemPtrNew(30*1024); > >And > >char *Pointer=new char[30*1024]; First, you should write 30*1024L to avoid overflowing a Int16. Second, the big difference is that the allocation using operator new[] stores a small amount of additional info so that operator delete[] knows how large the allocation was to properly deallocate it. The actual implementation of operator new[]/operator delete[] use MemPtrNew and MemPtrFree. -- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
