diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-12 20:05:25 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-12 20:05:25 +0200 |
commit | eb998b32640e83828ff3c81eabf86fe0f319bbcd (patch) | |
tree | bd3244434808481fdeaa793fc0ed9e2cac07f74e /libs/pbd | |
parent | cb6c975417bcc13a664163610fb62cfb3a0b9041 (diff) |
plug some memory leaks in libs
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/fpu.cc | 7 | ||||
-rw-r--r-- | libs/pbd/pbd.cc | 2 | ||||
-rw-r--r-- | libs/pbd/pbd/fpu.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc index 97e6ed59dd..33e646f744 100644 --- a/libs/pbd/fpu.cc +++ b/libs/pbd/fpu.cc @@ -129,6 +129,13 @@ FPU::instance() return _instance; } +void +FPU::destroy () +{ + delete _instance; + _instance = 0; +} + FPU::FPU () : _flags ((Flags) 0) { diff --git a/libs/pbd/pbd.cc b/libs/pbd/pbd.cc index 17d1588788..cf7e523349 100644 --- a/libs/pbd/pbd.cc +++ b/libs/pbd/pbd.cc @@ -34,6 +34,7 @@ #include "pbd/error.h" #include "pbd/id.h" #include "pbd/enumwriter.h" +#include "pbd/fpu.h" #ifdef PLATFORM_WINDOWS #include <winsock2.h> @@ -111,4 +112,5 @@ PBD::cleanup () #endif EnumWriter::destroy (); + FPU::destroy (); } diff --git a/libs/pbd/pbd/fpu.h b/libs/pbd/pbd/fpu.h index 4ab1a83561..463fef3ff2 100644 --- a/libs/pbd/pbd/fpu.h +++ b/libs/pbd/pbd/fpu.h @@ -38,6 +38,7 @@ class LIBPBD_API FPU { ~FPU (); static FPU* instance(); + static void destroy(); bool has_flush_to_zero () const { return _flags & HasFlushToZero; } bool has_denormals_are_zero () const { return _flags & HasDenormalsAreZero; } |