That is the problem that I have run into.  I need to delete database instances in the 
sub class.  What should really be happening is both deletes get called, or leave the 
super class delete to the programmer to handle. 

Anyone found a work around to this?  


[EMAIL PROTECTED] wrote:
> >> 2)Destructors don't seem to work at all.>
>I think you may have some options turned off in the compiler or so: I use
>both of these features and they work quite well.

FWIW, I had problems getting destructors to be called as well. The problem
is that if you create a subclass, but then call delete when the type is the
superclass, the base class destructor gets called, not the destructor of
the actual object.

ie
   CSomeClass *anObject;

   anObject = new CSubClass
   delete anObject           // calls CSomeClass delete, not CSubClass delete

This is bad if you make a base class (say CChore), and then want to delete
a derived instance (say CDoSomethingChore) in a generic way.

Brian


_____________________________________________________________________
Mark/Space Softworks                               voice 408-293-7299
111 West Saint John, 3rd Floor                       fax 408-293-7298
San Jose, CA 95113                         

    Mac OS, PalmOS, Windows, Web and Newton Software & Solutions:
        PageNOW!, PageME!, PhoneWatcher, Online, Communicate,
            ZMODEM, Telnet, PC-ANSI, Videotex CTB Tools


Reply via email to