mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Free memory after closing the preview and the setting windows
This commit is contained in:
		
							parent
							
								
									2c416cc4ac
								
							
						
					
					
						commit
						4be1e5702a
					
				
					 3 changed files with 8 additions and 5 deletions
				
			
		|  | @ -4,7 +4,7 @@ use warnings; | |||
| use utf8; | ||||
| 
 | ||||
| use Wx qw(:dialog :id :misc :sizer :systemsettings :notebook wxTAB_TRAVERSAL); | ||||
| use Wx::Event qw(EVT_BUTTON); | ||||
| use Wx::Event qw(EVT_CLOSE); | ||||
| use base 'Wx::Dialog'; | ||||
| 
 | ||||
| sub new { | ||||
|  | @ -18,6 +18,12 @@ sub new { | |||
|     $self->SetSizer($sizer); | ||||
|     $self->SetMinSize($self->GetSize); | ||||
|      | ||||
|     # needed to actually free memory | ||||
|     EVT_CLOSE($self, sub { | ||||
|         $self->EndModal(wxID_OK); | ||||
|         $self->Destroy; | ||||
|     }); | ||||
|      | ||||
|     return $self; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -29,6 +29,7 @@ sub new { | |||
|         $self->{materials}->Closing; | ||||
|          | ||||
|         $self->EndModal(wxID_OK); | ||||
|         $self->Destroy; | ||||
|     }); | ||||
|      | ||||
|     my $sizer = Wx::BoxSizer->new(wxVERTICAL); | ||||
|  |  | |||
|  | @ -323,10 +323,6 @@ sub Resize { | |||
|     } | ||||
| } | ||||
|   | ||||
| sub DESTROY { | ||||
|     my $self = shift; | ||||
| } | ||||
|   | ||||
| sub InitGL { | ||||
|     my $self = shift; | ||||
|   | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci