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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user