- Timestamp:
- Mar 23, 2023 10:30:09 AM (19 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
-
UIMachine.cpp (modified) (3 diffs)
-
UIMachineLogic.cpp (modified) (1 diff)
-
UIMachineLogic.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98983 r99134 1113 1113 if (pMachineLogic->checkAvailability()) 1114 1114 { 1115 /* Delete previous machine-logic if exists: */ 1116 if (m_pMachineLogic) 1117 { 1118 m_pMachineLogic->cleanup(); 1119 UIMachineLogic::destroy(m_pMachineLogic); 1120 m_pMachineLogic = 0; 1121 } 1115 /* Delete previous machine-logic if any: */ 1116 UIMachineLogic::destroy(m_pMachineLogic); 1122 1117 1123 1118 /* Set the new machine-logic as current one: */ … … 1134 1129 { 1135 1130 /* Delete temporary created machine-logic: */ 1136 pMachineLogic->cleanup();1137 1131 UIMachineLogic::destroy(pMachineLogic); 1138 1132 } … … 1793 1787 void UIMachine::cleanupMachineLogic() 1794 1788 { 1795 /* Destroy machine-logic if exists: */ 1796 if (m_pMachineLogic) 1797 { 1798 m_pMachineLogic->cleanup(); 1799 UIMachineLogic::destroy(m_pMachineLogic); 1800 m_pMachineLogic = 0; 1801 } 1789 /* Delete machine-logic if any: */ 1790 UIMachineLogic::destroy(m_pMachineLogic); 1802 1791 } 1803 1792 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r99092 r99134 175 175 176 176 /* static */ 177 void UIMachineLogic::destroy(UIMachineLogic *pLogic) 178 { 177 void UIMachineLogic::destroy(UIMachineLogic *&pLogic) 178 { 179 if (!pLogic) 180 return; 181 pLogic->cleanup(); 179 182 delete pLogic; 183 pLogic = 0; 180 184 } 181 185 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r98952 r99134 72 72 static UIMachineLogic *create(UIMachine *pMachine, UIVisualStateType enmVisualStateType); 73 73 /** Factory function to destroy passed @a pLogic. */ 74 static void destroy(UIMachineLogic * pLogic);74 static void destroy(UIMachineLogic *&pLogic); 75 75 76 76 /** Returns visual state type. */
Note:
See TracChangeset
for help on using the changeset viewer.

