From dce92611f3ff33e7db0a7234d611f5bffb0cc45f Mon Sep 17 00:00:00 2001 From: leak Date: Sun, 20 Jul 2014 00:39:43 +0200 Subject: Refactored singletons to enable proper deconstruction during shutdown --- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0380ec8bae9..d4afba54498 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1403,8 +1403,8 @@ class SmartWaypointMgr public: static SmartWaypointMgr* instance() { - static SmartWaypointMgr* instance = new SmartWaypointMgr(); - return instance; + static SmartWaypointMgr instance; + return &instance; } void LoadFromDB(); @@ -1439,8 +1439,8 @@ class SmartAIMgr public: static SmartAIMgr* instance() { - static SmartAIMgr* instance = new SmartAIMgr(); - return instance; + static SmartAIMgr instance; + return &instance; } void LoadSmartAIFromDB(); -- cgit v1.2.3