Closed Bug 1047757 Opened 6 years ago Closed 6 years ago

BluetoothService is leaked

Categories

(Firefox OS Graveyard :: Bluetooth, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
2.1 S2 (15aug)

People

(Reporter: khuey, Assigned: yrliou)

References

Details

(Keywords: memory-leak, perf, Whiteboard: [p=1][c=memory u= p= s=])

Attachments

(1 file, 1 obsolete file)

We store BluetoothService in a StaticRefPtr which is never cleared, so we leak.  The obvious thing to do here is use ClearOnShutdown on the StaticRefPtr.
Assignee: nobody → joliu
Whiteboard: [p=1]
Target Milestone: --- → 2.1 S2 (15aug)
As Kyle mentioned, we should call ClearOnShutdown(sBluetoothService) for nulling sBluetoothService on shutdown.
Patch Summary:
* Call ClearOnShutdown(sBluetoothService) after creating the instance.
* Use sBluetoothService directly in BluetoothService::Get()

Hi Shawn,

Could you help on reviewing this patch? Thanks.
Attachment #8468221 - Flags: review?(shuang)
Keywords: perf
Whiteboard: [p=1] → [p=1][c=memory u= p= s=]
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/8542bcd9ab6d
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.