From 8eb0472c323471d3074428cf5f42bdc881e4907a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 16 Jun 2020 10:25:14 +0800 Subject: [PATCH] 1 --- server/masterserver/app.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/server/masterserver/app.cc b/server/masterserver/app.cc index d8f8656..51f030e 100755 --- a/server/masterserver/app.cc +++ b/server/masterserver/app.cc @@ -19,6 +19,7 @@ #include "imsmgr.h" #include "GGListener.h" #include "IMListener.h" +#include "cachemgr.h" #include "ss_msgid.pb.h" #include "ss_proto.pb.h" @@ -93,6 +94,7 @@ void App::Init(int argc, char* argv[]) IMListener::Instance()->Init(); GSMgr::Instance()->Init(); IMSMgr::Instance()->Init(); + CacheMgr::Instance()->Init(); a8::UdpLog::Instance()->Info("masterserver starting instance_id:%d pid:%d", {instance_id, getpid()}); { @@ -114,6 +116,7 @@ void App::UnInit() if (terminated) { return; } + CacheMgr::Instance()->UnInit(); IMSMgr::Instance()->UnInit(); GSMgr::Instance()->UnInit(); IMListener::Instance()->UnInit(); @@ -125,14 +128,10 @@ void App::UnInit() f8::TGLog::Instance()->UnInit(); UnInitLog(); - delete im_msg_mutex_; - im_msg_mutex_ = nullptr; - delete msg_mutex_; - msg_mutex_ = nullptr; - delete loop_cond_; - loop_cond_ = nullptr; - delete loop_mutex_; - loop_mutex_ = nullptr; + A8_SAFE_DELETE(im_msg_mutex_); + A8_SAFE_DELETE(msg_mutex_); + A8_SAFE_DELETE(loop_cond_); + A8_SAFE_DELETE(loop_mutex_); } int App::Run()