diff --git a/bochs/gui/siminterface.cc b/bochs/gui/siminterface.cc index 89d42a04e..c63513f58 100644 --- a/bochs/gui/siminterface.cc +++ b/bochs/gui/siminterface.cc @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: siminterface.cc,v 1.37 2001-12-21 19:33:18 bdenney Exp $ +// $Id: siminterface.cc,v 1.38 2001-12-22 20:58:25 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // /* * gui/siminterface.cc - * $Id: siminterface.cc,v 1.37 2001-12-21 19:33:18 bdenney Exp $ + * $Id: siminterface.cc,v 1.38 2001-12-22 20:58:25 vruppert Exp $ * * Defines the actual link between bx_simulator_interface_c methods * and the simulator. This file includes bochs.h because it needs @@ -32,7 +32,7 @@ class bx_real_sim_c : public bx_simulator_interface_c { int enabled; public: bx_real_sim_c (); - ~bx_real_sim_c (); + virtual ~bx_real_sim_c (); virtual int get_init_done () { return init_done; } virtual int set_init_done (int n) { init_done = n; return 0;} virtual int register_param (bx_id id, bx_param_c *it); diff --git a/bochs/gui/siminterface.h b/bochs/gui/siminterface.h index a6ca2874d..e1ea520a5 100644 --- a/bochs/gui/siminterface.h +++ b/bochs/gui/siminterface.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: siminterface.h,v 1.30 2001-12-21 19:33:18 bdenney Exp $ +// $Id: siminterface.h,v 1.31 2001-12-22 20:58:25 vruppert Exp $ ///////////////////////////////////////////////////////////////////////// // /* * gui/siminterface.h - * $Id: siminterface.h,v 1.30 2001-12-21 19:33:18 bdenney Exp $ + * $Id: siminterface.h,v 1.31 2001-12-22 20:58:25 vruppert Exp $ * * Interface to the simulator, currently only used by control.cc. * The base class bx_simulator_interface_c, contains only virtual functions @@ -229,7 +229,7 @@ public: char *description, char *initial_val, int maxsize=-1); - ~bx_param_string_c (); + virtual ~bx_param_string_c (); void reset (); void set_handler (param_string_event_handler handler); Bit32s get (char *buf, int len); @@ -275,7 +275,7 @@ public: } bx_listopt_bits; //bx_list_c (bx_id id, int maxsize); bx_list_c (bx_id id, char *name, char *description, bx_param_c **init_list); - ~bx_list_c(); + virtual ~bx_list_c(); void add (bx_param_c *param); bx_param_c *get (int index); bx_param_num_c *get_options () { return options; } diff --git a/bochs/patches/patch.memleaks-tominac b/bochs/patches/patch.memleaks-tominac index 62ecceed7..3c9fc873b 100644 --- a/bochs/patches/patch.memleaks-tominac +++ b/bochs/patches/patch.memleaks-tominac @@ -11,6 +11,8 @@ and memory leaks. Bryce took the modified files, edited them a bit, and made it into this patch. +Volker Ruppert added 'virtual' to the destructors. + Patch was created with: cvs diff -u Apply patch to what version: @@ -163,7 +165,7 @@ diff -u -b -r1.36 siminterface.cc int enabled; public: bx_real_sim_c (); -+ ~bx_real_sim_c (); ++ virtual ~bx_real_sim_c (); virtual int get_init_done () { return init_done; } virtual int set_init_done (int n) { init_done = n; return 0;} virtual int register_param (bx_id id, bx_param_c *it); @@ -252,7 +254,7 @@ diff -u -b -r1.29 siminterface.h char *description, char *initial_val, int maxsize=-1); -+ ~bx_param_string_c (); ++ virtual ~bx_param_string_c (); void reset (); void set_handler (param_string_event_handler handler); Bit32s get (char *buf, int len); @@ -260,7 +262,7 @@ diff -u -b -r1.29 siminterface.h } bx_listopt_bits; //bx_list_c (bx_id id, int maxsize); bx_list_c (bx_id id, char *name, char *description, bx_param_c **init_list); -+ ~bx_list_c(); ++ virtual ~bx_list_c(); void add (bx_param_c *param); bx_param_c *get (int index); bx_param_num_c *get_options () { return options; }