Try setting the peripheral reference to nil after receiving the diddisconnect callback instead of when you cancel connection. On 03.11.2012, at 15:15, "Andras Kovi" <allprog@gmail.com> wrote:
I observed that after I cancel a peripheral connection and set the peripheral reference to nil, the peripheral object is collected by ARC and a warning is shown that the peripheral was still in use (disconnecting if it was connected earlier).
So I have two questions: 1. Can I turn this warning off? If I cancel a peripheral connection, I don't care what happens to the peripheral object later.
2. If I have to be aware of the connecting and disconnecting states, then why isn't there a flag on CBPeripheral that shows it? Every application will have to reimplement this anyway.
Thanks, Andras
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/kissling%40oberon.ch
This email sent to kissling@oberon.ch
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com