You need to this: CObject *pMyObject = new CObject;
instead of: CObject MyObject; I wouldn't worry to much about increasing the stack size. Once you allocate your objects on the heap instead of the stack, I think that you will find that your stack problems will be resolved. Bill MacAdam Visual Solutions -----Original Message----- From: Syed Najeebullah Hussaini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 9:39 AM To: Palm Developer Forum Subject: RE: Stack Overflow How can i make the coding technique to be heap-intensive one. Also please do suggest where exactly i can increase the stack size in constructor..??? Regards >Subject: Stack Overflow >From: "DNR" <[EMAIL PROTECTED]> >Date: Wed, 31 Jul 2002 10:00:54 +0600 > >What are the known reasons for having the error "stack Overflow" ? One known reason: You've used too much stack! You can increase it (using the Constructor) but probably the problem is your coding techniques are stack-intensive and will have to change to be heap-intensive instead. >This happens at different points in my function in different ROMs. > >Does it have anything to with using Classes (Object Oriented) Modify your classes to use very little stack. Use heap allocations/deallocations within your classes. Avoid recursion. Avoid arrays of objects. Roger Stringer Marietta Systems, Inc. -- 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/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
