Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c8da7519 authored by wilsonshih's avatar wilsonshih
Browse files

Use WeakReference for the TaskSnapshotWindow in inner Window.

Use WeakReference for the TaskSnapshotWindow so it can be clear at GC.
Also clear the TaskSnapshotWindow reference in
mStartingWindowRecords since it should be removed immediately.

Still observer the native Binder reference could hold the reference to
the TaskSnapshotWindow$Window object, from the local test it can be
released after force GC(need to trigger on system_server and systemUI).
So at least with this patch, TaskSnapshotWindow object can be released
immediately.

Bug: 225363815
Test: open several tasksnapshot starting window, verify the memory can
be released on perfetto.
Test: atest TaskSnapshotWindowTest StartingSurfaceDrawerTests

Change-Id: Iaa0a266c2c6756cef24d92cde57a6debc947e133
parent 500a0751
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment