Changeset 55457 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Apr 27, 2015 4:37:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r55436 r55457 476 476 * Note that unregisterMetrics() has unregistered all metrics associated 477 477 * with Host including network interface ones. We can destroy network 478 * interface objects now. 478 * interface objects now. Don't forget the uninit call, otherwise this 479 * causes a race with crashing API clients getting their stale references 480 * cleaned up and VirtualBox shutting down. 479 481 */ 480 m->llNetIfs.clear(); 482 while (!m->llNetIfs.empty()) 483 { 484 ComObjPtr<HostNetworkInterface> &pNet = m->llNetIfs.front(); 485 pNet->uninit(); 486 m->llNetIfs.pop_front(); 487 } 481 488 482 489 #ifdef VBOX_WITH_USB … … 493 500 #ifdef VBOX_WITH_USB 494 501 /* uninit all USB device filters still referenced by clients 495 * Note! HostUSBDeviceFilter::uninit() will modify llChildren. */ 502 * Note! HostUSBDeviceFilter::uninit() will modify llChildren. 503 * This list should be already empty, but better be safe than sorry. */ 496 504 while (!m->llChildren.empty()) 497 505 { 498 506 ComObjPtr<HostUSBDeviceFilter> &pChild = m->llChildren.front(); 507 pChild->uninit(); 499 508 m->llChildren.pop_front(); 500 pChild->uninit(); 501 } 502 509 } 510 511 /* No need to uninit these, as either Machine::uninit() or the above loop 512 * already covered them all. Subset of llChildren. */ 503 513 m->llUSBDeviceFilters.clear(); 504 514 #endif 515 516 /* uninit all host DVD medium objects */ 517 while (!m->llDVDDrives.empty()) 518 { 519 ComObjPtr<Medium> &pMedium = m->llDVDDrives.front(); 520 pMedium->uninit(); 521 m->llDVDDrives.pop_front(); 522 } 523 /* uninit all host floppy medium objects */ 524 while (!m->llFloppyDrives.empty()) 525 { 526 ComObjPtr<Medium> &pMedium = m->llFloppyDrives.front(); 527 pMedium->uninit(); 528 m->llFloppyDrives.pop_front(); 529 } 505 530 506 531 delete m; … … 1846 1871 } 1847 1872 if (!fFound) 1873 { 1874 pCached->uninit(); 1848 1875 itCached = pllCached->erase(itCached); 1876 } 1849 1877 else 1850 1878 ++itCached; … … 2990 3018 { 2991 3019 fGone = false; 3020 (*itNew)->uninit(); 2992 3021 listCopy.erase(itNew); 2993 3022 break; … … 2998 3027 # ifdef VBOX_WITH_RESOURCE_USAGE_API 2999 3028 (*itOld)->i_unregisterMetrics(aCollector, this); 3029 (*itOld)->uninit(); 3000 3030 # endif 3001 3031 }
Note:
See TracChangeset
for help on using the changeset viewer.