Explicitly destroy static Glib::RefPtr<>
s on exit (fixes #3636)
This commit is contained in:
@@ -81,6 +81,29 @@ void CursorManager::init (Glib::RefPtr<Gdk::Window> mainWindow)
|
|||||||
window = mainWindow;
|
window = mainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CursorManager::cleanup()
|
||||||
|
{
|
||||||
|
cAdd.reset();
|
||||||
|
cAddPicker.reset();
|
||||||
|
cCropDraw.reset();
|
||||||
|
cCrosshair.reset();
|
||||||
|
cHandClosed.reset();
|
||||||
|
cHandOpen.reset();
|
||||||
|
cEmpty.reset();
|
||||||
|
cMoveBL.reset();
|
||||||
|
cMoveBR.reset();
|
||||||
|
cMoveL.reset();
|
||||||
|
cMoveR.reset();
|
||||||
|
cMoveTL.reset();
|
||||||
|
cMoveTR.reset();
|
||||||
|
cMoveX.reset();
|
||||||
|
cMoveY.reset();
|
||||||
|
cMoveXY.reset();
|
||||||
|
cRotate.reset();
|
||||||
|
cWB.reset();
|
||||||
|
cWait.reset();
|
||||||
|
}
|
||||||
|
|
||||||
/* Set the cursor of the given window */
|
/* Set the cursor of the given window */
|
||||||
void CursorManager::setCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape)
|
void CursorManager::setCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape)
|
||||||
{
|
{
|
||||||
|
@@ -82,6 +82,7 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
void init (Glib::RefPtr<Gdk::Window> mainWindow);
|
void init (Glib::RefPtr<Gdk::Window> mainWindow);
|
||||||
|
void cleanup ();
|
||||||
static void setWidgetCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
static void setWidgetCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
||||||
static void setCursorOfMainWindow (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
static void setCursorOfMainWindow (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
||||||
};
|
};
|
||||||
|
@@ -262,10 +262,17 @@ void ClutComboBox::setBatchMode(bool yes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ClutComboBox::cleanup()
|
||||||
|
{
|
||||||
|
cm.reset();
|
||||||
|
cm2.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ClutComboBox::updateUnchangedEntry()
|
void ClutComboBox::updateUnchangedEntry()
|
||||||
{
|
{
|
||||||
auto c = m_model()->children();
|
auto c = m_model()->children();
|
||||||
|
|
||||||
if (batchMode) {
|
if (batchMode) {
|
||||||
if (c.empty() || c[c.size()-1][m_columns().clutFilename] != "NULL") {
|
if (c.empty() || c[c.size()-1][m_columns().clutFilename] != "NULL") {
|
||||||
Gtk::TreeModel::Row row = *(m_model()->append());
|
Gtk::TreeModel::Row row = *(m_model()->append());
|
||||||
|
@@ -18,6 +18,8 @@ public:
|
|||||||
void setSelectedClut( Glib::ustring filename );
|
void setSelectedClut( Glib::ustring filename );
|
||||||
void setBatchMode(bool yes);
|
void setBatchMode(bool yes);
|
||||||
|
|
||||||
|
static void cleanup();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateUnchangedEntry(); // in batchMode we need to add an extra entry "(Unchanged)". We do this whenever the widget is mapped (connecting to signal_map()), unless options.multiDisplayMode (see the comment below about cm2 in this case)
|
void updateUnchangedEntry(); // in batchMode we need to add an extra entry "(Unchanged)". We do this whenever the widget is mapped (connecting to signal_map()), unless options.multiDisplayMode (see the comment below about cm2 in this case)
|
||||||
|
|
||||||
|
@@ -581,6 +581,15 @@ void MyExpander::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MyExpander::cleanup()
|
||||||
|
{
|
||||||
|
inconsistentImage.reset();
|
||||||
|
enabledImage.reset();
|
||||||
|
disabledImage.reset();
|
||||||
|
openedImage.reset();
|
||||||
|
closedImage.reset();
|
||||||
|
}
|
||||||
|
|
||||||
MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) :
|
MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) :
|
||||||
enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr),
|
enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr),
|
||||||
child(nullptr), headerWidget(nullptr), statusImage(nullptr),
|
child(nullptr), headerWidget(nullptr), statusImage(nullptr),
|
||||||
|
@@ -231,6 +231,7 @@ public:
|
|||||||
|
|
||||||
/// Initialize the class by loading the images
|
/// Initialize the class by loading the images
|
||||||
static void init();
|
static void init();
|
||||||
|
static void cleanup();
|
||||||
|
|
||||||
Glib::SignalProxy1< bool, GdkEventButton* > signal_button_release_event()
|
Glib::SignalProxy1< bool, GdkEventButton* > signal_button_release_event()
|
||||||
{
|
{
|
||||||
|
@@ -857,6 +857,16 @@ bool RTWindow::on_delete_event (GdkEventAny* event)
|
|||||||
cacheMgr->closeCache (); // also makes cleanup if too large
|
cacheMgr->closeCache (); // also makes cleanup if too large
|
||||||
WhiteBalance::cleanup();
|
WhiteBalance::cleanup();
|
||||||
ProfilePanel::cleanup();
|
ProfilePanel::cleanup();
|
||||||
|
ClutComboBox::cleanup();
|
||||||
|
MyExpander::cleanup();
|
||||||
|
mainWindowCursorManager.cleanup();
|
||||||
|
editWindowCursorManager.cleanup();
|
||||||
|
BatchQueueEntry::savedAsIcon.reset();
|
||||||
|
FileBrowserEntry::editedIcon.reset();
|
||||||
|
FileBrowserEntry::recentlySavedIcon.reset();
|
||||||
|
FileBrowserEntry::enqueuedIcon.reset();
|
||||||
|
FileBrowserEntry::hdr.reset();
|
||||||
|
FileBrowserEntry::ps.reset();
|
||||||
|
|
||||||
if (!options.windowMaximized) {
|
if (!options.windowMaximized) {
|
||||||
get_size (options.windowWidth, options.windowHeight);
|
get_size (options.windowWidth, options.windowHeight);
|
||||||
|
Reference in New Issue
Block a user