Changeset 19017 in vbox for trunk/src/VBox
- Timestamp:
- Apr 20, 2009 8:12:58 AM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r18818 r19017 2742 2742 2743 2743 /* delete the settings only when the file actually exists */ 2744 lockConfig();2745 2744 if (isConfigLocked()) 2746 2745 { … … 8108 8107 "Size of resident portion of VM process in memory."); 8109 8108 /* Create and register base metrics */ 8110 IUnknown *objptr; 8111 8112 ComObjPtr<Machine> tmp = aMachine; 8113 tmp.queryInterfaceTo (&objptr); 8114 pm::BaseMetric *cpuLoad = new pm::MachineCpuLoadRaw (hal, objptr, pid, 8115 cpuLoadUser, cpuLoadKernel); 8109 pm::BaseMetric *cpuLoad = new pm::MachineCpuLoadRaw (hal, aMachine, pid, 8110 cpuLoadUser, cpuLoadKernel); 8116 8111 aCollector->registerBaseMetric (cpuLoad); 8117 pm::BaseMetric *ramUsage = new pm::MachineRamUsage (hal, objptr, pid,8118 8112 pm::BaseMetric *ramUsage = new pm::MachineRamUsage (hal, aMachine, pid, 8113 ramUsageUsed); 8119 8114 aCollector->registerBaseMetric (ramUsage); 8120 8115 -
trunk/src/VBox/Main/PerformanceImpl.cpp
r18487 r19017 492 492 m.baseMetrics.begin(), m.baseMetrics.end(), std::bind2nd ( 493 493 std::mem_fun (&pm::BaseMetric::associatedWith), aObject)); 494 /* Delete the content of the list as well */ 495 BaseMetricList::iterator it1 = it; 496 for (;it1 != m.baseMetrics.end(); ++it1) 497 delete *it1; 494 498 m.baseMetrics.erase(it, m.baseMetrics.end()); 495 499 LogAleksey(("{%p} " LOG_FN_FMT ": after remove_if: m.baseMetrics.size()=%d\n", this, __PRETTY_FUNCTION__, m.baseMetrics.size())); … … 508 512 m.metrics.begin(), m.metrics.end(), std::bind2nd ( 509 513 std::mem_fun (&pm::Metric::associatedWith), aObject)); 514 /* Delete the content of the list as well */ 515 MetricList::iterator it1 = it; 516 for (;it1 != m.metrics.end(); ++it1) 517 delete *it1; 510 518 m.metrics.erase(it, m.metrics.end()); 511 519 //LogFlowThisFuncLeave(); -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r18520 r19017 1093 1093 /* save the global registry */ 1094 1094 rc = saveSettings(); 1095 CheckComRCReturnRC (rc);1096 1097 /* Close settings file for this machine. */1098 rc = machine->unlockConfig();1099 1095 1100 1096 /* return the unregistered machine to the caller */ -
trunk/src/VBox/Main/include/MachineImpl.h
r18520 r19017 799 799 800 800 HRESULT lockConfig(); 801 public: /* To have it available in VirtualBox::UnregisterMachine. */802 801 HRESULT unlockConfig(); 803 802 804 protected:805 803 /** @note This method is not thread safe */ 806 804 BOOL isConfigLocked() … … 1117 1115 } 1118 1116 1117 1119 1118 #endif // ____H_MACHINEIMPL 1120 1119 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.