summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index c3b935987..714c8deee 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1489,6 +1489,8 @@ void Fl_Window::hide() {
handle(FL_HIDE);
#if defined(WIN32)
+ // make sure any custom icons get freed
+ icons(NULL, 0);
// this little trick keeps the current clipboard alive, even if we are about
// to destroy the window that owns the selection.
if (GetClipboardOwner()==ip->xid)
@@ -1553,6 +1555,8 @@ Fl_Window::~Fl_Window() {
if (xclass_) {
free(xclass_);
}
+ free_icons();
+ delete icon_;
}
// FL_SHOW and FL_HIDE are called whenever the visibility of this widget