No incremental leaks here..
* downcase (const char*) uses strdup, caller needs to free
* free allocated cursors when the editor is destroyed
* drop static editor lua-instance & bindings
* delete allocated gtk image/icons
delete luawindow; luawindow = 0;
delete editor; editor = 0;
delete mixer; mixer = 0;
+ delete rc_option_editor; rc_option_editor = 0; // failed to wrap object warning
delete nsm; nsm = 0;
delete gui_object_state; gui_object_state = 0;
delete main_window_visibility;
}
window.set_title (title.get_string());
- window.set_wmclass (string_compose (X_("%1_%1"), downcase (PROGRAM_NAME), downcase (name)), PROGRAM_NAME);
+ window.set_wmclass (string_compose (X_("%1_%1"), downcase (std::string(PROGRAM_NAME)), downcase (name)), PROGRAM_NAME);
window.set_flags (CAN_FOCUS);
window.add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
delete _locations;
delete _playlist_selector;
delete _time_info_box;
+ delete selection;
+ delete cut_buffer;
+ delete _cursors;
+
+ LuaInstance::destroy_instance ();
for (list<XMLNode *>::iterator i = selection_op_history.begin(); i != selection_op_history.end(); ++i) {
delete *i;
}
+ for (std::map<ARDOUR::FadeShape, Gtk::Image*>::const_iterator i = _xfade_in_images.begin(); i != _xfade_in_images.end (); ++i) {
+ delete i->second;
+ }
+ for (std::map<ARDOUR::FadeShape, Gtk::Image*>::const_iterator i = _xfade_out_images.begin(); i != _xfade_out_images.end (); ++i) {
+ delete i->second;
+ }
}
XMLNode*
return _instance;
}
+void
+LuaInstance::destroy_instance ()
+{
+ delete _instance;
+ _instance = 0;
+}
+
LuaInstance::LuaInstance ()
{
lua.Print.connect (&_lua_print);
{
public:
static LuaInstance* instance();
+ static void destroy_instance();
~LuaInstance();
static void register_classes (lua_State* L);
{
}
+MouseCursors::~MouseCursors ()
+{
+ drop_all ();
+}
+
void
MouseCursors::drop_all ()
{
{
public:
MouseCursors ();
+ ~MouseCursors ();
void set_cursor_set (const std::string& name);
std::string cursor_set() const { return _cursor_set; }
basename += color_name;
basename += "-";
- basename += downcase(PROGRAM_NAME);
+ basename += downcase(std::string(PROGRAM_NAME));
std::string rev (revision);
std::size_t pos = rev.find_first_of("-");