forked from organicmaps/organicmaps
[android] delete framework on destroy
This commit is contained in:
parent
3dab5a514b
commit
f97d838969
3 changed files with 3 additions and 6 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -216,4 +216,4 @@ namespace android
|
|||
};
|
||||
}
|
||||
|
||||
extern android::Framework * g_framework;
|
||||
extern unique_ptr<android::Framework> g_framework;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue