From 8dea6505e92a93156820ea24f1256f08cf2b9e8f Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 6 Dec 2022 16:35:36 +0100 Subject: Windows: fix memory leak caused by RegisterDragDrop (#569) - call RevokeDragDrop() when the window is hidden - do not delete the *static* FLDropTarget object --- src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/drivers/WinAPI') diff --git a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx index 45e5cb39e..8a789bd1d 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx @@ -470,6 +470,9 @@ void Fl_WinAPI_Window_Driver::hide() { return; } + // Issue #569: undo RegisterDragDrop() + RevokeDragDrop((HWND)ip->xid); + // make sure any custom icons get freed // icons(NULL, 0); // free_icons() is called by the Fl_Window destructor // this little trick keeps the current clipboard alive, even if we are about -- cgit v1.2.3