We've built a couple of large C++ apps and run into very few problems with
C++ in particular. We've also been conservative avoiding things like
multiple inheritance.
My personal style for working on PalmOS is to avoid memory allocation as
much as possible. It introduces possible failures and then you must have
error checking code where the failure occurs and everywhere above. Also
there's overhead for every block you allocate. My preference is to get all
the memory you need for an operation or set of operations (e.g., display
and handling events for a form) up front. So I often put all the classes
needed into the main class I use for the form and new it when the form is
opened.
I definitely avoid things like lots of news and deletes for lots of small
objects. Also avoid automatically (stack) allocated classes. I suppose this
is less C++ and some would say I'm not using the power of the language.
This was mentioned sort of previously, but vtables are globals, thus you
can't use inheritance with classes you call from anything but a full launch
of the app.
LL
At 02:47 AM 9/18/99 -0400, Kourosh Bodaghi - XPAND Corp 703.742.0900 wrote:
>I understand it is possible to use C++ in codewarrior. Is there any
>special procedure I need to follow for defining and using classes in the
>palm application?
>