I thought of that, but how does it explain how the object does work from the alternate launch codes if allocated from the stack?
(Unless maybe it has something to do with the compiler being able to bypass the v-table and optimize the virtual function calls into regular static function calls in some cases but not others. For example, if the object is allocated on the stack, there may be no pointers-to-objects involved, but if it's allocated on the heap, then maybe there are pointers.)
That sounds exactly like why it would work. BTW, CW doesn't do vtable-bypass optimizations, as far as I remember, so a stack-allocated object would not be able to use virtual functions in a no-global situation.
And of course, bypassing vtables for a stack-based object goes away as soon as you pass a pointer or reference to that object to another function.
-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
