[android] shutting down thread pool of the CustomGeometrySource when the source is destroyed

This commit is contained in:
Łukasz Paczos
2018-07-31 19:42:09 +02:00
committed by Łukasz Paczos
parent b500577bfa
commit 63d4ac05f2
8 changed files with 198 additions and 26 deletions

View File

@@ -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) {