Fix memory leak where SC for drag is never released
Steps: Finish DnD from any app and check `adb shell dumpsys SurfaceFlinger` Observation: Drag surface remanined even after force GC, but got cleared on "Force stop" or "killing" the client app that started drag. Some things observed in debugging: When passing surface control over binder, a new native object ptr was created so releasing the received SC doesn't mean the sent SC is also cleared. So, need to release local variables as well to ensure no memory leak. Bug: 314059463 Test: manual Change-Id: Id45bcf5c7a243a5e9c5dde33138c74089f1deb28
Loading
Please register or sign in to comment