Fix a memory leak on Android