[android] delete framework on destroy

This commit is contained in:
Arsentiy Milchakov 2018-05-03 17:48:49 +03:00 committed by mpimenov
parent 3dab5a514b
commit f97d838969
3 changed files with 3 additions and 6 deletions

View file

@ -45,7 +45,7 @@
using namespace std;
using namespace std::placeholders;
android::Framework * g_framework = 0;
unique_ptr<android::Framework> g_framework;
namespace platform
{
@ -90,9 +90,6 @@ Framework::Framework()
, m_isCurrentModeInitialized(false)
, m_isChoosePositionMode(false)
{
ASSERT_EQUAL ( g_framework, 0, () );
g_framework = this;
m_work.GetTrafficManager().SetStateListener(bind(&Framework::TrafficStateChanged, this, _1));
}

View file

@ -216,4 +216,4 @@ namespace android
};
}
extern android::Framework * g_framework;
extern unique_ptr<android::Framework> g_framework;

View file

@ -30,7 +30,7 @@ extern "C"
Java_com_mapswithme_maps_MwmApplication_nativeInitFramework(JNIEnv * env, jclass clazz)
{
if (!g_framework)
g_framework = new android::Framework();
g_framework = make_unique<android::Framework>();
}
// static void nativeProcessTask(long taskPointer);