Changed DisplaySetting::instance() to return a ref_ptr<>& rathern than a raw C pointer to enable apps to delete the singleton or assign their own.

This commit is contained in:
Robert Osfield
2010-04-30 11:48:30 +00:00
parent afce262601
commit c2a59415ce
5 changed files with 51 additions and 11 deletions

View File

@@ -15,6 +15,7 @@
#define OSG_DisplaySettings 1
#include <osg/Referenced>
#include <osg/ref_ptr>
#include <string>
#include <vector>
@@ -33,8 +34,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
public:
/** Maintain a DisplaySettings singleton for objects to query at runtime.*/
static DisplaySettings* instance();
static ref_ptr<DisplaySettings>& instance();
DisplaySettings():
Referenced(true)