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
Loading
Please register or sign in to comment