File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,10 @@ Eluna::Eluna(Map* map) :
5050event_level(0 ),
5151push_counter(0 ),
5252boundMap(map),
53-
54- L(NULL ),
55- eventMgr(NULL )
53+ L(NULL )
5654{
5755 OpenLua ();
58- eventMgr = new EventMgr (this );
56+ eventMgr = std::make_unique< EventMgr> (this );
5957
6058 // if the script cache is ready, run scripts, otherwise flag state for reload
6159 if (sElunaLoader ->GetCacheState () == SCRIPT_CACHE_READY)
@@ -67,8 +65,6 @@ eventMgr(NULL)
6765Eluna::~Eluna ()
6866{
6967 CloseLua ();
70- delete eventMgr;
71- eventMgr = NULL ;
7268}
7369
7470void Eluna::CloseLua ()
Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ class ELUNA_GAME_API Eluna
241241public:
242242
243243 lua_State* L;
244- EventMgr* eventMgr;
244+ std::unique_ptr< EventMgr> eventMgr;
245245
246246#if defined ELUNA_TRINITY
247247 QueryCallbackProcessor queryProcessor;
You can’t perform that action at this time.
0 commit comments