NativeMessageQueue: ensure nativeDestroy success

android_os_MessageQueue_nativeDestroy leaves a cyclic reference between its Looper instance and its NativeMessageQueue instance, resulting in a memory and fd leak.

Solution: break the cyclic reference with weak pointer wp<>.

Bug: 244478726

Signed-off-by: Jintao Zhu <zhu.jintao@gm.com>
Change-Id: Ic2a183b5cc7c05f9ade95a0602d425badd3d97b1
1 file changed