I have a fairly large m68k project (Weasel Reader) that I've built with prc-tools 2.3.
Recently, I've been rewriting some of the graphics code in a class framework to make my life simpler. Unfortunately, it seems that when one of my objects' destructors is called, the device jumps off someplace random on return from the destructor. For example, I have a pure virtual base class: class Widget { public: virtual ~Widget(void) { } virtual Boolean foo(void) = 0; }; And an inherited class that does the work: class Bar : public Widget { Bar(void); ~Bar(void); Boolean foo(void); }; Bar::~Bar(void) { // Nothing to do, just return } In my code, I create Bar via new, enter my event loop, then do some processing. When the user returns to the index form, the object is destroyed via delete. The destructor is run and all seems fine. When the destructor returns, it does *not* return to where it should. I should mention that the Bar class is in another code segment. If I place it in the default segment, my code works just fine. Of course, the default segment is just too small to hold these objects. I should also mention that the code calling Bar's destructor is itself in a different segment. What is going on? This is the first time I've used any C++ class stuff with prc-tools... are there any caveats I should be aware of? Specifically with multi-segment programs? This is with prc-tools 2.3 which I compiled myself in mid-January. One more note: When I say that the return jump from the destructor doesn't go to the correct place, I base that upon what I see in the debugger. GDB doesn't handle multiple segments well, but I have applied the Msect GDB patch... but I suppose it's possible that what I see in the debugger may not actually be correct. I'm confused... -- --John Gruenenfelder Research Assistant, Steward Observatory, U of Arizona [EMAIL PROTECTED] Try Weasel Reader for PalmOS -- http://gutenpalm.sf.net "This is the most fun I've had without being drenched in the blood of my enemies!" --Sam of Sam & Max -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/