Index: device/bluetooth/bluetooth_socket_mac.mm |
diff --git a/device/bluetooth/bluetooth_socket_mac.mm b/device/bluetooth/bluetooth_socket_mac.mm |
index 83b30a8582f3e70be22d15936cf90169ec675518..c1805baad69d7fc7bcfbc280aea2d9fc524b60a5 100644 |
--- a/device/bluetooth/bluetooth_socket_mac.mm |
+++ b/device/bluetooth/bluetooth_socket_mac.mm |
@@ -46,15 +46,14 @@ |
namespace device { |
BluetoothSocketMac::BluetoothSocketMac(IOBluetoothRFCOMMChannel* rfcomm_channel) |
- : rfcomm_channel_(rfcomm_channel), |
- delegate_([[BluetoothRFCOMMChannelDelegate alloc] initWithSocket:this]) { |
- [rfcomm_channel_ setDelegate:delegate_]; |
+ : rfcomm_channel_(rfcomm_channel) { |
+ [rfcomm_channel_ setDelegate:[[BluetoothRFCOMMChannelDelegate alloc] |
+ initWithSocket:this]]; |
ResetIncomingDataBuffer(); |
} |
BluetoothSocketMac::~BluetoothSocketMac() { |
- [rfcomm_channel_ release]; |
- [delegate_ release]; |
+ [rfcomm_channel_ closeChannel]; |
Mark Mentovai
2013/04/11 21:48:58
Does IOBluetoothRFCOMMChannel release its delegate
Mark Mentovai
2013/04/11 21:48:58
How does rfcomm_channel_ get released now?
youngki
2013/04/11 22:14:29
So.. I did a bunch of testing with a bluetooth app
Mark Mentovai
2013/04/11 22:24:37
youngki wrote:
youngki
2013/04/12 01:51:47
Thanks for pointing this out; and you are right, I
|
} |
// static |