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;
|
||||
}
|
||||
|
||||
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 */
|
||||
void CursorManager::setCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape)
|
||||
{
|
||||
|
@@ -82,6 +82,7 @@ private:
|
||||
|
||||
public:
|
||||
void init (Glib::RefPtr<Gdk::Window> mainWindow);
|
||||
void cleanup ();
|
||||
static void setWidgetCursor (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
||||
static void setCursorOfMainWindow (Glib::RefPtr<Gdk::Window> window, CursorShape shape);
|
||||
};
|
||||
|
@@ -262,6 +262,13 @@ void ClutComboBox::setBatchMode(bool yes)
|
||||
}
|
||||
|
||||
|
||||
void ClutComboBox::cleanup()
|
||||
{
|
||||
cm.reset();
|
||||
cm2.reset();
|
||||
}
|
||||
|
||||
|
||||
void ClutComboBox::updateUnchangedEntry()
|
||||
{
|
||||
auto c = m_model()->children();
|
||||
|
@@ -18,6 +18,8 @@ public:
|
||||
void setSelectedClut( Glib::ustring filename );
|
||||
void setBatchMode(bool yes);
|
||||
|
||||
static void cleanup();
|
||||
|
||||
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)
|
||||
|
||||
|
@@ -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) :
|
||||
enabled(false), inconsistent(false), flushEvent(false), expBox(nullptr),
|
||||
child(nullptr), headerWidget(nullptr), statusImage(nullptr),
|
||||
|
@@ -231,6 +231,7 @@ public:
|
||||
|
||||
/// Initialize the class by loading the images
|
||||
static void init();
|
||||
static void cleanup();
|
||||
|
||||
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
|
||||
WhiteBalance::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) {
|
||||
get_size (options.windowWidth, options.windowHeight);
|
||||
|
Reference in New Issue
Block a user