-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Symptoms
I have a Unity app targeting ARM32 Android devices, which experienced memory exhaustion and OOM termination during video playbook operations. Memory profiling revealed that FFI resources were not being properly released, leading to progressive memory accumulation until system limits were exceeded.
Problem
FFI handle disposal fails on ARM32 platforms (armv7), causing resource cleanup issues. All FfiDropHandle() calls return false, preventing proper memory management during operations like video playback.
Root Cause
Type mismatch between C# IntPtr (32-bit on ARM32) and Rust FfiHandleId (64-bit). The current FFI function signature expects a 64-bit handle ID, but receives a 32-bit pointer on ARM32 platforms.
Potential Solution
Platform-specific function signatures, see: holofermes@4242930
This fix should maintain backward compatibility while resolving the handle disposal issue on ARM32 platforms.