Fix Android backend cleanup (#3681)

This commit is contained in:
Adrian Cojocaru
2025-08-25 22:24:06 +03:00
committed by GitHub
parent 12a303aa3c
commit 3cef33215c
3 changed files with 20 additions and 4 deletions

View File

@@ -196,6 +196,11 @@ void MapRenderer::requestSnapshot(SnapshotCallback callback) {
void MapRenderer::resetRenderer() {
renderer.reset();
#if MLN_RENDER_BACKEND_OPENGL
// GL requires the context managed by the java surface for cleanup
// Vulkan resources can be released on any thread (finalizer in this case)
backend.reset();
#endif
swapBehaviorFlush = false;
}