mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Removed memory leaks due to Sidebar::priv::object_manipulation, Sidebar::priv::object_settings and Sidebar::priv::frequently_changed_parameters not being deleted
This commit is contained in:
		
							parent
							
								
									26c8eed1ae
								
							
						
					
					
						commit
						97bb4a80cc
					
				
					 1 changed files with 17 additions and 4 deletions
				
			
		|  | @ -614,10 +614,10 @@ struct Sidebar::priv | |||
|     PresetComboBox *combo_printer; | ||||
| 
 | ||||
|     wxBoxSizer *sizer_params; | ||||
|     FreqChangedParams   *frequently_changed_parameters; | ||||
|     ObjectList          *object_list; | ||||
|     ObjectManipulation  *object_manipulation; | ||||
|     ObjectSettings      *object_settings; | ||||
|     FreqChangedParams   *frequently_changed_parameters{ nullptr }; | ||||
|     ObjectList          *object_list{ nullptr }; | ||||
|     ObjectManipulation  *object_manipulation{ nullptr }; | ||||
|     ObjectSettings      *object_settings{ nullptr }; | ||||
|     ObjectInfo *object_info; | ||||
|     SlicedInfo *sliced_info; | ||||
| 
 | ||||
|  | @ -626,10 +626,23 @@ struct Sidebar::priv | |||
|     wxButton *btn_send_gcode; | ||||
| 
 | ||||
|     priv(Plater *plater) : plater(plater) {} | ||||
|     ~priv(); | ||||
| 
 | ||||
|     void show_preset_comboboxes(); | ||||
| }; | ||||
| 
 | ||||
| Sidebar::priv::~priv() | ||||
| { | ||||
|     if (object_manipulation != nullptr) | ||||
|         delete object_manipulation; | ||||
| 
 | ||||
|     if (object_settings != nullptr) | ||||
|         delete object_settings; | ||||
| 
 | ||||
|     if (frequently_changed_parameters != nullptr) | ||||
|         delete frequently_changed_parameters; | ||||
| } | ||||
| 
 | ||||
| void Sidebar::priv::show_preset_comboboxes() | ||||
| { | ||||
|     const bool showSLA = wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri