Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed the older and no longer used Singleton definition in Referenc…

…eCounting.h
  • Loading branch information...
commit c0efeb692acf67c809b1b8cea3d0f59e688c517f 1 parent 6b9a0e3
Jim Carroll authored
Showing with 0 additions and 29 deletions.
  1. +0 −29 xbmc/utils/ReferenceCounting.h
View
29 xbmc/utils/ReferenceCounting.h
@@ -114,33 +114,4 @@ namespace xbmcutil
};
- /**
- * Currently THIS IS NOT THREAD SAFE! Why not just add a lock you ask?
- * Because this singleton is used to initialize global variables and
- * there is an issue with having the lock used prior to its
- * initialization. No matter what, if this class is used as a replacement
- * for global variables there's going to be a race condition if it's used
- * anywhere else. So currently this is the only prescribed use.
- *
- * Therefore this hack depends on the fact that compilation unit global/static
- * initialization is done in a single thread.
- *
- * In the spirit of making changes incrementally I've opted to not add Atomic*
- * locking to this class yet. It doesn't need it (yet) as it's only called
- * from the static initialization thread prior to main.
- */
- template <class T> class Singleton
- {
- static T* instance;
- public:
- static T* getInstance()
- {
- if (instance == NULL)
- instance = new T;
- return instance;
- }
- };
-
- template <class T> T* Singleton<T>::instance;
-
}
Please sign in to comment.
Something went wrong with that request. Please try again.