Chromium Code Reviews
Descriptionarc: bluetooth: Fix LSAN error in fake_bluetooth_instance
fake_bluetooth_instance used raw pointer to store all the
requests to mojo BluetoothInstance. However, this can easisly
caused memory leak unless we are carefully delete those data.
This CL changes it to std::unique_ptr<> to auto destroy those
data when fake_bluetooth_instance is destroyed.
BUG=634898
TEST=Run tests with ASAN and LSAN
Committed: https://crrev.com/dea5e4beeecc2dac9ec84dd30741a24d2214795f
Cr-Commit-Position: refs/heads/master@{#410160}
Patch Set 1 #Patch Set 2 : Add #include <memory> for unique_ptr #
Messages
Total messages: 15 (8 generated)
|
||||||||||||||||||||||||||||