plug some memory leaks in libs
This commit is contained in:
parent
cb6c975417
commit
eb998b3264
@ -87,6 +87,13 @@ BufferSet::clear()
|
||||
_vst_buffers.clear ();
|
||||
#endif
|
||||
|
||||
#ifdef LV2_SUPPORT
|
||||
for (LV2Buffers::iterator i = _lv2_buffers.begin(); i != _lv2_buffers.end(); ++i) {
|
||||
delete (*i).second;
|
||||
}
|
||||
_lv2_buffers.clear ();
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/** Set up this BufferSet so that its data structures mirror a PortSet's buffers.
|
||||
|
@ -459,6 +459,7 @@ Graph::main_thread()
|
||||
}
|
||||
|
||||
pt->drop_buffers();
|
||||
delete (pt);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -699,6 +699,7 @@ LV2Plugin::~LV2Plugin ()
|
||||
|
||||
delete [] _control_data;
|
||||
delete [] _shadow_data;
|
||||
delete [] _defaults;
|
||||
delete [] _ev_buffers;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ class LIBGTKMM2EXT_API PixFader : public CairoWidget
|
||||
public:
|
||||
PixFader (Gtk::Adjustment& adjustment, int orientation, int span, int girth);
|
||||
virtual ~PixFader ();
|
||||
static void flush_pattern_cache();
|
||||
|
||||
sigc::signal<void> StartGesture;
|
||||
sigc::signal<void> StopGesture;
|
||||
|
@ -85,6 +85,15 @@ PixFader::~PixFader ()
|
||||
if (_layout) _layout.clear (); // drop reference to existing layout
|
||||
}
|
||||
|
||||
void
|
||||
PixFader::flush_pattern_cache () {
|
||||
for (list<FaderImage*>::iterator f = _patterns.begin(); f != _patterns.end(); ++f) {
|
||||
cairo_pattern_destroy ((*f)->pattern);
|
||||
}
|
||||
_patterns.clear();
|
||||
}
|
||||
|
||||
|
||||
cairo_pattern_t*
|
||||
PixFader::find_pattern (double afr, double afg, double afb,
|
||||
double abr, double abg, double abb,
|
||||
|
@ -81,6 +81,8 @@ Port::~Port ()
|
||||
for (int i = 0; i < 16; i++) {
|
||||
delete _channel[i];
|
||||
}
|
||||
|
||||
delete _parser;
|
||||
}
|
||||
|
||||
/** Send a clock tick message.
|
||||
|
@ -129,6 +129,13 @@ FPU::instance()
|
||||
return _instance;
|
||||
}
|
||||
|
||||
void
|
||||
FPU::destroy ()
|
||||
{
|
||||
delete _instance;
|
||||
_instance = 0;
|
||||
}
|
||||
|
||||
FPU::FPU ()
|
||||
: _flags ((Flags) 0)
|
||||
{
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user