mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1003658 - Avoid to create reference cycle in BluetoothProfileController which would cause memory leak. r=echou, f=shuang
This commit is contained in:
parent
43e932c8d7
commit
8da6a0a900
@ -69,7 +69,6 @@ BluetoothProfileController::BluetoothProfileController(
|
||||
mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
|
||||
MOZ_ASSERT(mTimer);
|
||||
|
||||
mCheckProfileStatusCallback = new CheckProfileStatusCallback(this);
|
||||
mProfiles.Clear();
|
||||
|
||||
/**
|
||||
@ -225,8 +224,8 @@ BluetoothProfileController::StartSession()
|
||||
}
|
||||
|
||||
if (mTimer) {
|
||||
mTimer->InitWithCallback(mCheckProfileStatusCallback, CONNECTION_TIMEOUT_MS,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
mTimer->InitWithCallback(new CheckProfileStatusCallback(this),
|
||||
CONNECTION_TIMEOUT_MS, nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
|
||||
BT_LOGR("%s", mConnect ? "connecting" : "disconnecting");
|
||||
|
@ -139,7 +139,6 @@ private:
|
||||
} mTarget;
|
||||
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsCOMPtr<nsITimerCallback> mCheckProfileStatusCallback;
|
||||
};
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user