Refactor NativeMapView to hold std::unique_ptr to Map and DefaultFileSource

Add missing asserts to attach_jni_thread/detach_jni_thread
Fixes #2406
This commit is contained in:
Leith Bade
2015-09-24 12:18:59 +10:00
parent f6a784ce8c
commit 3de441f20e
3 changed files with 31 additions and 20 deletions

View File

@@ -91,8 +91,8 @@ private:
// Ensure these are initialised last
std::shared_ptr<mbgl::SQLiteCache> fileCache;
mbgl::DefaultFileSource fileSource;
mbgl::Map map;
std::unique_ptr<mbgl::DefaultFileSource> fileSource;
std::unique_ptr<mbgl::Map> map;
std::atomic_flag clean = ATOMIC_FLAG_INIT;
};