the endless quest to plug memory leaks -- episode 379
This commit is contained in:
@@ -861,12 +861,13 @@ Editor::Editor ()
|
||||
|
||||
Editor::~Editor()
|
||||
{
|
||||
delete button_bindings;
|
||||
delete button_bindings;
|
||||
delete _routes;
|
||||
delete _route_groups;
|
||||
delete _track_canvas_viewport;
|
||||
delete _drags;
|
||||
delete nudge_clock;
|
||||
delete _verbose_cursor;
|
||||
delete quantize_dialog;
|
||||
delete _summary;
|
||||
delete _group_tabs;
|
||||
|
||||
@@ -1646,11 +1646,13 @@ LuaCallback::set_session (ARDOUR::Session *s)
|
||||
{
|
||||
SessionHandlePtr::set_session (s);
|
||||
|
||||
if (_session) {
|
||||
lua_State* L = lua.getState();
|
||||
LuaBindings::set_session (L, _session);
|
||||
if (!_session) {
|
||||
return;
|
||||
}
|
||||
|
||||
lua_State* L = lua.getState();
|
||||
LuaBindings::set_session (L, _session);
|
||||
|
||||
reconnect();
|
||||
}
|
||||
|
||||
@@ -1664,6 +1666,10 @@ LuaCallback::session_going_away ()
|
||||
_session = 0;
|
||||
|
||||
drop_callback (); /* EMIT SIGNAL */
|
||||
|
||||
lua_State* L = lua.getState();
|
||||
LuaBindings::set_session (L, 0);
|
||||
lua.do_command ("collectgarbage();");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -198,7 +198,7 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Container& parent, g
|
||||
|
||||
case SessionEnd:
|
||||
case RangeEnd:
|
||||
points = new ArdourCanvas::Points ();
|
||||
points = new ArdourCanvas::Points (); // leaks
|
||||
points->push_back (ArdourCanvas::Duple ( M6, 0.0));
|
||||
points->push_back (ArdourCanvas::Duple ( M6, MH));
|
||||
points->push_back (ArdourCanvas::Duple (0.0, MH * .5));
|
||||
@@ -316,6 +316,7 @@ ArdourMarker::~ArdourMarker ()
|
||||
/* destroying the parent group destroys its contents, namely any polygons etc. that we added */
|
||||
delete group;
|
||||
delete _track_canvas_line;
|
||||
delete points;
|
||||
}
|
||||
|
||||
void ArdourMarker::reparent(ArdourCanvas::Container & parent)
|
||||
@@ -543,6 +544,7 @@ TempoMarker::update_height_mark (const double& ratio)
|
||||
const double M3 = std::max(1.f, rintf(3.f * UIConfiguration::instance().get_ui_scale()));
|
||||
const double M6 = std::max(2.f, rintf(6.f * UIConfiguration::instance().get_ui_scale()));
|
||||
|
||||
delete points;
|
||||
points = new ArdourCanvas::Points ();
|
||||
points->push_back (ArdourCanvas::Duple ( M3, top));
|
||||
points->push_back (ArdourCanvas::Duple ( M6, min (top + (MH * .6), MH)));
|
||||
|
||||
@@ -85,7 +85,9 @@ boost::weak_ptr<Route> RouteUI::_showing_sends_to;
|
||||
std::string RouteUI::program_port_prefix;
|
||||
|
||||
RouteUI::RouteUI (ARDOUR::Session* sess)
|
||||
: mute_menu(0)
|
||||
: monitor_input_button (0)
|
||||
, monitor_disk_button (0)
|
||||
, mute_menu(0)
|
||||
, solo_menu(0)
|
||||
, sends_menu(0)
|
||||
, record_menu(0)
|
||||
@@ -123,6 +125,8 @@ RouteUI::~RouteUI()
|
||||
delete comment_window;
|
||||
delete input_selector;
|
||||
delete output_selector;
|
||||
delete monitor_input_button;
|
||||
delete monitor_disk_button;
|
||||
delete _invert_menu;
|
||||
|
||||
send_blink_connection.disconnect ();
|
||||
@@ -182,13 +186,13 @@ RouteUI::init ()
|
||||
show_sends_button->set_name ("send alert button");
|
||||
UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), "");
|
||||
|
||||
monitor_input_button = manage (new ArdourButton (ArdourButton::default_elements));
|
||||
monitor_input_button = new ArdourButton (ArdourButton::default_elements);
|
||||
monitor_input_button->set_name ("monitor button");
|
||||
monitor_input_button->set_text (_("In"));
|
||||
UI::instance()->set_tip (monitor_input_button, _("Monitor input"), "");
|
||||
monitor_input_button->set_no_show_all (true);
|
||||
|
||||
monitor_disk_button = manage (new ArdourButton (ArdourButton::default_elements));
|
||||
monitor_disk_button = new ArdourButton (ArdourButton::default_elements);
|
||||
monitor_disk_button->set_name ("monitor button");
|
||||
monitor_disk_button->set_text (_("Disk"));
|
||||
UI::instance()->set_tip (monitor_disk_button, _("Monitor playback"), "");
|
||||
|
||||
@@ -104,6 +104,7 @@ ShuttleControl::~ShuttleControl ()
|
||||
{
|
||||
cairo_pattern_destroy (pattern);
|
||||
cairo_pattern_destroy (shine_pattern);
|
||||
delete text_color;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -929,6 +929,8 @@ TimeAxisView::order_selection_trims (ArdourCanvas::Item *item, bool put_start_on
|
||||
}
|
||||
}
|
||||
|
||||
// retuned rect is pushed back into the used_selection_rects list
|
||||
// in TimeAxisView::show_selection() which is the only caller.
|
||||
SelectionRect *
|
||||
TimeAxisView::get_selection_rect (uint32_t id)
|
||||
{
|
||||
@@ -938,7 +940,9 @@ TimeAxisView::get_selection_rect (uint32_t id)
|
||||
|
||||
for (list<SelectionRect*>::iterator i = used_selection_rects.begin(); i != used_selection_rects.end(); ++i) {
|
||||
if ((*i)->id == id) {
|
||||
return (*i);
|
||||
SelectionRect* ret = (*i);
|
||||
used_selection_rects.erase (i);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -219,8 +219,6 @@ class TimeAxisView : public virtual AxisView
|
||||
typedef std::vector<boost::shared_ptr<TimeAxisView> > Children;
|
||||
Children get_child_list ();
|
||||
|
||||
SelectionRect* get_selection_rect(uint32_t id);
|
||||
|
||||
static uint32_t preset_height (Height);
|
||||
|
||||
protected:
|
||||
@@ -320,6 +318,8 @@ class TimeAxisView : public virtual AxisView
|
||||
static uint32_t extra_height;
|
||||
static int const _max_order;
|
||||
|
||||
SelectionRect* get_selection_rect(uint32_t id);
|
||||
|
||||
void compute_heights ();
|
||||
bool maybe_set_cursor (int y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user