Made the more of the OSG's referenced object desctructors protected to ensure
that they arn't created on the stack inappropriately. Split the implemention of Matrix up so that it is a simple no referenced counted class and can be safefly created on the stack. To support referenced counting a seperate subclass now exists, this is RefMatrix which inherits from both Matrix and Object.
This commit is contained in:
@@ -35,15 +35,12 @@ typedef std::deque<std::string> FilePathList;
|
||||
The RegisterReaderWriterProxy can be used to automatically
|
||||
register at runtime a reader/writer with the Registry.
|
||||
*/
|
||||
class OSGDB_EXPORT Registry
|
||||
class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
{
|
||||
public:
|
||||
|
||||
static Registry* instance();
|
||||
|
||||
~Registry();
|
||||
|
||||
|
||||
/** read the command line string list, removing any matched control sequences.*/
|
||||
void readCommandLine(std::vector<std::string>& commandLine);
|
||||
|
||||
@@ -142,7 +139,9 @@ class OSGDB_EXPORT Registry
|
||||
static void convertStringPathIntoFilePathList(const std::string& paths,FilePathList& filepath);
|
||||
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
virtual ~Registry();
|
||||
|
||||
typedef std::map<std::string,osg::ref_ptr<DotOsgWrapper> > DotOsgWrapperMap;
|
||||
typedef std::vector<osg::ref_ptr<ReaderWriter> > ReaderWriterList;
|
||||
|
||||
Reference in New Issue
Block a user