Introduced depend_on template and usage in RenderBin.cpp's singleton to solve crash on exit in static builds.

This commit is contained in:
Robert Osfield
2009-06-06 10:08:43 +00:00
parent 90325a5895
commit 83b84eb2f4
2 changed files with 20 additions and 4 deletions

View File

@@ -31,6 +31,13 @@ namespace osg {
class DeleteHandler;
class Observer;
/** template class to help enforce static initialization order. */
template <typename T, T M()>
struct depends_on
{
depends_on() { M(); }
};
/** Base class from providing referencing counted objects.*/
class OSG_EXPORT Referenced
{