diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-07-31 19:42:09 +0200 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-08-10 18:31:52 +0200 |
commit | 63d4ac05f20190d7ac3df1f852840e9678b9e7dd (patch) | |
tree | 563c6308ca6c0c8cad0e4a10a1c76352c2e31cc8 /platform/android/src/native_map_view.cpp | |
parent | b500577bfa9759241b374c161a06c1bef79cf4cd (diff) | |
download | qtlocation-mapboxgl-63d4ac05f20190d7ac3df1f852840e9678b9e7dd.tar.gz |
[android] shutting down thread pool of the CustomGeometrySource when the source is destroyed
Diffstat (limited to 'platform/android/src/native_map_view.cpp')
-rwxr-xr-x | platform/android/src/native_map_view.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index 44b04fc538..8da44c10cb 100755 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -892,7 +892,9 @@ void NativeMapView::removeSource(JNIEnv& env, jni::Object<Source> obj, jlong sou assert(sourcePtr != 0); mbgl::android::Source *source = reinterpret_cast<mbgl::android::Source *>(sourcePtr); - source->removeFromMap(env, obj, *map); + if (source->removeFromMap(env, obj, *map)) { + source->releaseJavaPeer(); + } } void NativeMapView::addImage(JNIEnv& env, jni::String name, jni::Object<Bitmap> bitmap, jni::jfloat scale, jni::jboolean sdf) { |