some notes on mem-leaks...
authorRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 11:22:15 +0000 (13:22 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 12:43:18 +0000 (14:43 +0200)
libs/ardour/plugin_manager.cc
libs/ardour/tempo.cc
libs/pbd/pbd/abstract_ui.cc

index d868b1d00aede6eb4c0007530e54b38fd6f1ca62..269cb0d801da45c7e830e4cc9f2f8f9a767a9d7b 100644 (file)
@@ -582,6 +582,11 @@ PluginManager::ladspa_discover (string path)
        DEBUG_TRACE (DEBUG::PluginManager, string_compose ("LADSPA plugin found at %1\n", path));
 
        for (uint32_t i = 0; ; ++i) {
+               /* if a ladspa plugin allocates memory here
+                * it is never free()ed (or plugin-dependent only when unloading).
+                * For some plugins memory allocated is incremental, we should
+                * avoid re-scanning plugins and file bug reports.
+                */
                if ((descriptor = dfunc (i)) == 0) {
                        break;
                }
index e2de5ba49f7c5c695126b54c4f377733f334ce0a..2a0ac50cc2759d31ce19b1caf5f4f84122b87ec2 100644 (file)
@@ -284,6 +284,7 @@ TempoMap::TempoMap (framecnt_t fr)
        start.beats = 1;
        start.ticks = 0;
 
+       // these leak memory, well Metrics does
        TempoSection *t = new TempoSection (start, _default_tempo.beats_per_minute(), _default_tempo.note_type());
        MeterSection *m = new MeterSection (start, _default_meter.divisions_per_bar(), _default_meter.note_divisor());
 
index 40b4ea8d9361419a08fab8e226ca374ebff80681..52dc3fa12aa44a901d07f1ff0d1d357b8960522a 100644 (file)
@@ -444,7 +444,7 @@ AbstractUI<RequestObject>::call_slot (InvalidationRecord* invalidation, const bo
 template<typename RequestObject> void*
 AbstractUI<RequestObject>::request_buffer_factory (uint32_t num_requests)
 {
-       RequestBuffer*  mcr = new RequestBuffer (num_requests);
+       RequestBuffer*  mcr = new RequestBuffer (num_requests); // leaks
        per_thread_request_buffer.set (mcr);
        return mcr;
 }