fix issue that basic_window may be leaked

This commit is contained in:
Jinhao 2017-05-04 04:00:19 +08:00
parent 526f3d6d6b
commit aab3686037

View File

@ -111,6 +111,15 @@ namespace nana
public:
using window_handle_type = basic_window*;
~window_register()
{
//Deleting a basic_window if thread never called exec(), the basic_window object
//will always stay in trash.
//
//Empty the trash before destructs window register
delete_trash(0);
}
void insert(window_handle_type wd)
{
if (wd)