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

Issue 741050 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 742628



Sign in to add a comment

BluetoothAdvertisement should be unique_ptr owned by caller of BluetoothAdapter::RegisterAdvertisement

Project Member Reported by sonnysasaka@chromium.org, Jul 11 2017

Issue description

Right now, BluetoothAdvertisement being ref counted causes problems for clients that do not Unregister before deleting the shared pointer, i.e. the BluetoothAdvertisement becomes "dangling" as the shared pointer is also held by BluetoothAdapter. 
By making BluetoothAdvertisement unique_ptr owned by clients, we can make sure that its destructor gets called when unique_ptr is deleted, which in turn will call Unregister.
 
Cc: jlklein@chromium.org lesliewatkins@chromium.org jonmann@chromium.org jhawkins@chromium.org
Blocking: 742628
Labels: -Pri-2 Pri-1

Sign in to add a comment