fix issue that basic_window may be leaked
This commit is contained in:
		
							parent
							
								
									526f3d6d6b
								
							
						
					
					
						commit
						aab3686037
					
				@ -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)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user