gltfio on Java: free material cache in AssetLoader#destroy

Fixes #3469
This commit is contained in:
Philip Rideout
2021-01-29 10:30:46 -08:00
parent 411ae23512
commit 893ed861e9
4 changed files with 27 additions and 1 deletions

View File

@@ -34,3 +34,10 @@ Java_com_google_android_filament_gltfio_MaterialProvider_nDestroyMaterialProvide
auto provider = (MaterialProvider*) nativeProvider;
delete provider;
}
extern "C" JNIEXPORT void JNICALL
Java_com_google_android_filament_gltfio_MaterialProvider_nDestroyMaterials(JNIEnv*, jclass,
jlong nativeProvider) {
auto provider = (MaterialProvider*) nativeProvider;
provider->destroyMaterials();
}