src/runtime_src/xdp/profile/database/database.cpp
// The database and all the plugins are singletons and can be
//  destroyed at the end of the execution in any order.  So, 
//  each plugin is responsible for registering itself at the 
//  time the library is loaded and removing it if it is destroyed first.
The database and all the plugins are singletons and can be
destroyed at the end of the execution in any order.  So,
each plugin is responsible for registering itself at the
time the library is loaded and removing it if it is destroyed first.
The database and all the plugins are singletons and can be destroyed at the end of the execution in any order . So each plugin is responsible for registering itself at the time the library is loaded and removing it if it is destroyed first .
VPDatabase::~VPDatabase()
  {
    for (auto p : plugins)
    {
      p->writeAll(false) ;
    }
    plugins.clear();
    devices.clear();
    numDevices = 0;
    VPDatabase::live = false ;    
  }
VPDatabase :: ~ VPDatabase ( ) { for ( auto p : plugins ) { p -> writeAll ( false ) ; } plugins . clear ( ) ; devices . clear ( ) ; numDevices = 0 ; VPDatabase :: live = false ; }
The database and all the plugins are singletons and can be
destroyed at the end of the execution in any order.
The database and all the plugins are singletons and can be destroyed at the end of the execution in any order .
// The only plugins that should still be in this vector are ones //  that have not been destroyed yet.