If CW does not support the RTTI conventions of ANSI C++ (it might I have not
checked), or if you do not want the huge overhead RTTI might force, you will
need to create that base class and have in it a class name member along with
new() and delete() overrides that call the global new() and delete() passing
the class name for the logging.
>The only thing I can think of is developing a root class 'Object' from
which
>all other classes derive, with a pure virtual initialization method that
>defines a constant string that contains the derived class name. This
method
>would attempt to find its 'this' pointer in my accumulated list of
>allocations, and on success, inject its name string into the allocation
>record.
>
>Too bad I can't just call someObject.getClass().getName()!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/