New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 846522 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

device::BluetoothAdapterBlueZ maintains advertisements until shutdown

Project Member Reported by khorimoto@chromium.org, May 24 2018

Issue description

Each time device::BluetoothAdapterBlueZ::RegisterAdvertisement() is called, a new advertisement is added to BluetoothAdapterBlueZ's advertisements_ field.

This field grows endlessly until BluetoothAdapterBlueZ::Shutdown() is called. This advertisements_ field is a std::vector<scoped_refptr<BluetoothAdvertisementBlueZ>>, so since a scoped_refptr is used, these objects stay in memory until Shutdown() is called.

Worse yet, it appears that Shutdown() is only actually called on Linux: https://cs.chromium.org/chromium/src/device/bluetooth/bluetooth_adapter_factory.cc?rcl=0a0244661b2798de0b4232bd1bcff6b297f82236&l=135-141

So, unless I'm mistaken, CrOS will hold onto these advertisements forever, until the process dies.
 

Comment 1 by tengs@chromium.org, May 24 2018

Cc: hongjunchoi@chromium.org

Sign in to add a comment