mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Fixes minor memory leak found in color_theme_manager.cpp:326
This commit is contained in:
parent
ca98c7a051
commit
114bc97f94
2 changed files with 11 additions and 1 deletions
|
|
@ -165,6 +165,16 @@ ColorThemeManager::ColorThemeManager ()
|
||||||
show_all ();
|
show_all ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ColorThemeManager::~ColorThemeManager ()
|
||||||
|
{
|
||||||
|
if (palette_group) {
|
||||||
|
palette_group->clear (true);
|
||||||
|
delete palette_group;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ColorThemeManager::setup_modifiers ()
|
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 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) {
|
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));
|
ArdourCanvas::Rectangle* r = new ArdourCanvas::Rectangle (&group, ArdourCanvas::Rect (x, y, x + box_size, y + box_size));
|
||||||
|
|
||||||
string name = nc[color_num++].name;
|
string name = nc[color_num++].name;
|
||||||
|
|
||||||
UIConfiguration::Colors::iterator c = colors.find (name);
|
UIConfiguration::Colors::iterator c = colors.find (name);
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ class ColorThemeManager : public Gtk::VBox, public OptionEditorComponent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ColorThemeManager();
|
ColorThemeManager();
|
||||||
|
~ColorThemeManager();
|
||||||
|
|
||||||
void reset_canvas_colors();
|
void reset_canvas_colors();
|
||||||
void on_color_theme_changed ();
|
void on_color_theme_changed ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue