mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Get rid of Trinity Singleton and Threading patterns and replace them with ACE_Singletons and ACE_GUARD_x macro´s with ACE_Thread_Mutex´es respectively.
Also get rid of unused CountedReference class that used Trinity threading pattern. --HG-- branch : trunk
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "Define.h"
|
||||
#include "Dynamic/UnorderedMap.h"
|
||||
#include "Policies/Singleton.h"
|
||||
#include "ace/Singleton.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -94,11 +94,6 @@ class ObjectRegistry
|
||||
return i_registeredObjects;
|
||||
}
|
||||
|
||||
private:
|
||||
RegistryMapType i_registeredObjects;
|
||||
friend class Trinity::OperatorNew<ObjectRegistry<T, Key> >;
|
||||
|
||||
// protected for friend use since it should be a singleton
|
||||
ObjectRegistry() {}
|
||||
~ObjectRegistry()
|
||||
{
|
||||
@@ -106,6 +101,9 @@ class ObjectRegistry
|
||||
delete iter->second;
|
||||
i_registeredObjects.clear();
|
||||
}
|
||||
private:
|
||||
RegistryMapType i_registeredObjects;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user