Simplified the API for using the DatabasePager, by providing a single

DatabasePager::updateSceneGraph(..) method, and added a ref_ptr<> into
osDB::Registry for managing a single DatabasePager in a centralised way.
This commit is contained in:
Robert Osfield
2004-01-06 21:18:36 +00:00
parent 3ea1bb6de7
commit 894537a016
6 changed files with 69 additions and 55 deletions

View File

@@ -197,6 +197,11 @@ Registry::Registry()
Registry::~Registry()
{
// switch off the pager and its associated thread before we clean up
// rest of the Registry.
_databasePager = 0;
// unload all the plugin before we finally destruct.
closeAllLibraries();
}
@@ -1835,3 +1840,10 @@ void Registry::clearObjectCache()
{
_objectCache.clear();
}
DatabasePager* Registry::getOrCreateDatabasePager()
{
if (!_databasePager) _databasePager = new DatabasePager;
return _databasePager.get();
}