Fixes minor memory leak found in color_theme_manager.cpp:326
This commit is contained in:
parent
ca98c7a051
commit
114bc97f94
|
@ -165,6 +165,16 @@ ColorThemeManager::ColorThemeManager ()
|
|||
show_all ();
|
||||
}
|
||||
|
||||
|
||||
ColorThemeManager::~ColorThemeManager ()
|
||||
{
|
||||
if (palette_group) {
|
||||
palette_group->clear (true);
|
||||
delete palette_group;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ColorThemeManager::setup_modifiers ()
|
||||
{
|
||||
|
@ -311,7 +321,6 @@ ColorThemeManager::build_palette_canvas (ArdourCanvas::Canvas& canvas, ArdourCan
|
|||
for (uint32_t y = 0; y < height - box_size && color_num < color_limit; y += box_size) {
|
||||
for (uint32_t x = 0; x < width - box_size && color_num < color_limit; x += box_size) {
|
||||
ArdourCanvas::Rectangle* r = new ArdourCanvas::Rectangle (&group, ArdourCanvas::Rect (x, y, x + box_size, y + box_size));
|
||||
|
||||
string name = nc[color_num++].name;
|
||||
|
||||
UIConfiguration::Colors::iterator c = colors.find (name);
|
||||
|
|
|
@ -43,6 +43,7 @@ class ColorThemeManager : public Gtk::VBox, public OptionEditorComponent
|
|||
{
|
||||
public:
|
||||
ColorThemeManager();
|
||||
~ColorThemeManager();
|
||||
|
||||
void reset_canvas_colors();
|
||||
void on_color_theme_changed ();
|
||||
|
|
Loading…
Reference in New Issue
Block a user