From 9f2e816c787c30ceeb139623c8dae594c4b4443d Mon Sep 17 00:00:00 2001 From: Martijn Otto Date: Wed, 11 May 2016 17:34:40 +0200 Subject: Work in progress on PHP7 compatibility --- include/parameters.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') 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 -- cgit v1.2.3