- Timestamp:
- Sep 15, 2008 11:14:35 AM (16 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/Performance.h
r12400 r12457 137 137 { 138 138 public: 139 virtual ~CollectorHAL() { }; 139 140 virtual int preCollect(const CollectorHints& hints) { return VINF_SUCCESS; } 140 141 virtual int getHostCpuLoad(ULONG *user, ULONG *kernel, ULONG *idle); -
trunk/src/VBox/Main/solaris/PerformanceSolaris.cpp
r12400 r12457 44 44 public: 45 45 CollectorSolaris(); 46 ~CollectorSolaris();46 virtual ~CollectorSolaris(); 47 47 virtual int getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available); 48 48 virtual int getProcessMemoryUsage(RTPROCESS process, ULONG *used); -
trunk/src/VBox/Main/win/PerformanceWin.cpp
r12418 r12457 40 40 public: 41 41 CollectorWin(); 42 ~CollectorWin();42 virtual ~CollectorWin(); 43 43 44 44 virtual int preCollect(const CollectorHints& hints); … … 185 185 mHostCpuLoadIdleHandle = getPropertyHandle(apEnumAccess[0], L"PercentProcessorTime"); 186 186 187 for (unsigned i=0;i<dwNumReturned;i++) 188 apEnumAccess[i]->Release(); 189 187 190 delete [] apEnumAccess; 188 191 … … 196 199 mProcessMemoryUsedHandle = getPropertyHandle(apEnumAccess[0], L"WorkingSet"); 197 200 201 for (unsigned i=0;i<dwNumReturned;i++) 202 apEnumAccess[i]->Release(); 203 198 204 delete [] apEnumAccess; 199 205 } … … 201 207 CollectorWin::~CollectorWin() 202 208 { 209 IWbemConfigureRefresher *pConfig = NULL; 210 HRESULT hr = S_OK; 211 203 212 if (NULL != mNameSpace) 204 213 { 205 214 mNameSpace->Release(); 215 } 216 if (NULL != mRefresher) 217 { 218 if (SUCCEEDED (hr = mRefresher->QueryInterface( 219 IID_IWbemConfigureRefresher, 220 (void **)&pConfig))) 221 { 222 // Remove the enumerators from the refresher. 223 hr = pConfig->Remove(mEnumProcessorID, 0); 224 Assert(SUCCEEDED(hr)); 225 hr = pConfig->Remove(mEnumProcessID, 0); 226 Assert(SUCCEEDED(hr)); 227 228 pConfig->Release(); 229 } 206 230 } 207 231 if (NULL != mEnumProcessor)
Note:
See TracChangeset
for help on using the changeset viewer.