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

Skip to content
Commit e300b894 authored by Ajay Panicker's avatar Ajay Panicker
Browse files

Use weak pointers to prevent callbacks from executing after cleanup

Switch from using the instance directly to using weak pointers to the
instance. This causes any base::Callback objects that are bound to that
weak instance to be cleaned up if the weak pointer becomes invalid.

Bug: 78134184
Test: valgrind ./net_test_avrcp
--gtest_filter=*disconnectAfterCleanupTest* and see that there is an
invalid read before the fix and it is gone after.

Change-Id: I46c3175e62b87be165e468d014155f8d8154c08a
parent 3d4a1f0e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment