From: ThorstenB Date: Sat, 19 Mar 2011 13:50:18 +0000 (+0100) Subject: Avoid some memory leaks in derived classes due to non-virtual destructors. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=44f27b23d0209d2ee9f508c43def5636564bb302;p=simgear.git Avoid some memory leaks in derived classes due to non-virtual destructors. --- diff --git a/simgear/scene/material/EffectElement.hxx b/simgear/scene/material/EffectElement.hxx index 3a7fdd4d..20d2da8c 100644 --- a/simgear/scene/material/EffectElement.hxx +++ b/simgear/scene/material/EffectElement.hxx @@ -22,7 +22,7 @@ namespace simgear class EffectElement { protected: - ~EffectElement() {} + virtual ~EffectElement() {} }; } #endif diff --git a/simgear/sound/sample_group.hxx b/simgear/sound/sample_group.hxx index 59d42b32..ccf1e85d 100644 --- a/simgear/sound/sample_group.hxx +++ b/simgear/sound/sample_group.hxx @@ -85,7 +85,7 @@ public: /** * Destructor */ - ~SGSampleGroup (); + virtual ~SGSampleGroup (); /** * Set the status of this sample group to active.