diff options
Diffstat (limited to 'include/parameters.h')
-rw-r--r-- | include/parameters.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/parameters.h b/include/parameters.h index 3465863..b5731e5 100644 --- a/include/parameters.h +++ b/include/parameters.h @@ -42,9 +42,17 @@ protected: public: /** - * Destructor + * Do _not_ add a virtual destructor here. + * + * We are extending a vector, which does not itself + * have a virtual destructor, so destructing through + * a pointer to this vector has no effect. + * + * By adding a virtual destructor we create a vtable, + * which makes the class bigger, causing slicing and + * then we are actually introducing the problem that + * we are trying to avoid! */ - virtual ~Parameters() {} /** * The object that is being called |