Menu

#185 destructor is not virtual

closed
5
2009-04-21
2008-08-26
No

delete_device and ~Device_Impl should be virtual in the same manner init_device is.

Discussion

  • Emmanuel Taurel

    Emmanuel Taurel - 2008-08-27

    Logged In: YES
    user_id=569547
    Originator: NO

    Hola,

    Looking at the file device.h release 3.26, I find them virtual!
    Could you precise your meaning.

    Cheers

    Emmanuel

     
  • Lothar Krause

    Lothar Krause - 2008-08-27

    Logged In: YES
    user_id=1729120
    Originator: YES

    I looked at the source code generated by POGO release 5.2.7 from Tango installation 6.1.1, and when I changed it to virtual the DS would crash when exiting.

     
  • Emmanuel Taurel

    Emmanuel Taurel - 2009-02-24

    I am not able to reproduce this behavior.
    Nevertheless, I confirm that the DeviceImpl dtor is declared as virtual in the file device.h.
    The method init_device is also declared as virtual in device.h.
    Declaring these 2 methods as virtual in the .h file generated by Pogo does not change anything.

    Cheers

    Emmanuel Taurel

     
  • Emmanuel Taurel

    Emmanuel Taurel - 2009-02-24

    I am not able to reproduce this behavior.
    Nevertheless, I confirm that the DeviceImpl dtor is declared as virtual in the file device.h.
    The method init_device is also declared as virtual in device.h.
    Declaring these 2 methods as virtual in the .h file generated by Pogo does not change anything.

    Cheers

    Emmanuel Taurel

     
  • Emmanuel Taurel

    Emmanuel Taurel - 2009-04-21
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB