summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartijn Otto <martijn.otto@copernica.com>2016-05-11 17:34:40 +0200
committerMartijn Otto <martijn.otto@copernica.com>2016-05-11 17:34:40 +0200
commit9f2e816c787c30ceeb139623c8dae594c4b4443d (patch)
treee434ebd2ff37c98bdc5934120b48cda1bf3899c2 /include
parent570590058d16274005a4994fd8f1046d0eaf7f74 (diff)
Work in progress on PHP7 compatibility
Diffstat (limited to 'include')
-rw-r--r--include/parameters.h12
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