jeremywen / JW-Modules

VCV Rack Modules
BSD 3-Clause "New" or "Revised" License
216 stars 26 forks source link

Fix memory leaks #89

Closed falkTX closed 2 years ago

falkTX commented 2 years ago

As title says. These were auto-detected by valgrind.

==890428== 64 bytes in 1 blocks are definitely lost in loss record 2,255 of 3,615
==890428==    at 0x6E8F2F3: operator new[](unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==890428==    by 0x19EC3EB: TrigsDisplay::TrigsDisplay() (Trigs.cpp:442)
==890428==    by 0x19E957E: TrigsWidget::TrigsWidget(Trigs*) (Trigs.cpp:614)
==890428==    by 0x19ED861: rack::CardinalPluginModel<Trigs, TrigsWidget>::createModuleWidget(rack::engine::Module*) (helpers.hpp:70)
==890428==    by 0x6B3ACD: CardinalDISTRHO::CardinalUI::uiIdle() (CardinalUI.cpp:491)
==890428==    by 0x6CA0FA: CardinalDISTRHO::UIExporter::plugin_idle() (DistrhoUIInternal.hpp:248)
==890428==    by 0x6C6368: CardinalDISTRHO::runSelfTests() (DistrhoPluginJACK.cpp:861)
==890428==    by 0x6C65AC: main (DistrhoPluginJACK.cpp:963)
==890428== 

==890428== 4 bytes in 1 blocks are definitely lost in loss record 6 of 3,615
==890428==    at 0x6E8F2F3: operator new[](unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==890428==    by 0x19BD96D: NoteSeqFu::NoteSeqFu() (NoteSeqFu.cpp:149)
==890428==    by 0x19C583D: rack::CardinalPluginModel<NoteSeqFu, NoteSeqFuWidget>::createModule() (helpers.hpp:52)
==890428==    by 0x6B39D9: CardinalDISTRHO::CardinalUI::uiIdle() (CardinalUI.cpp:484)
==890428==    by 0x6CA0FA: CardinalDISTRHO::UIExporter::plugin_idle() (DistrhoUIInternal.hpp:248)
==890428==    by 0x6C6368: CardinalDISTRHO::runSelfTests() (DistrhoPluginJACK.cpp:861)
==890428==    by 0x6C65AC: main (DistrhoPluginJACK.cpp:963)
==890428==