aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Wischer <twischer@de.adit-jv.com>2017-10-09 16:38:20 +0200
committerDavid Robillard <d@drobilla.net>2018-11-10 11:50:50 +0100
commite003490b5007cde0f434063060f769409461f44b (patch)
treef4583c5d8eedb27311cb7d3a4d2ea7bb79b74836
parent9e4256253ba8ef5742658b9e33f993d715aa62b9 (diff)
downloadjalv-e003490b5007cde0f434063060f769409461f44b.tar.gz
jalv-e003490b5007cde0f434063060f769409461f44b.tar.bz2
jalv-e003490b5007cde0f434063060f769409461f44b.zip
Free LilvNodes when no longer required
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
-rw-r--r--src/jalv.c14
-rw-r--r--src/jalv_qt.cpp3
2 files changed, 17 insertions, 0 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 3adbb28..df7c779 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -1211,6 +1211,20 @@ jalv_close(Jalv* const jalv)
#ifdef HAVE_SUIL
suil_host_free(jalv->ui_host);
#endif
+
+ for (unsigned i = 0; i < jalv->controls.n_controls; ++i) {
+ ControlID* const control = jalv->controls.controls[i];
+ lilv_node_free(control->node);
+ lilv_node_free(control->symbol);
+ lilv_node_free(control->label);
+ lilv_node_free(control->group);
+ lilv_node_free(control->min);
+ lilv_node_free(control->max);
+ lilv_node_free(control->def);
+ free(control);
+ }
+ free(jalv->controls.controls);
+
if (jalv->sratom) {
sratom_free(jalv->sratom);
}
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp
index aa6aea4..582361f 100644
--- a/src/jalv_qt.cpp
+++ b/src/jalv_qt.cpp
@@ -422,6 +422,7 @@ Control::Control(PortContainer portContainer, QWidget* parent)
} else {
steps = DIAL_STEPS;
}
+ lilv_node_free(stepsNode);
// Fill scalePoints Map
LilvScalePoints* sp = lilv_port_get_scale_points(plugin, lilvPort);
@@ -654,11 +655,13 @@ build_control_widget(Jalv* jalv)
} else {
layout->addWidget(control);
}
+ lilv_node_free(lastGroup);
lastGroup = group;
uint32_t index = lilv_port_get_index(plugin, port->lilv_port);
jalv->ports[index].widget = control;
}
+ lilv_node_free(lastGroup);
grid->setLayout(layout);