Re: deallocation while connecting
Re: deallocation while connecting
- Subject: Re: deallocation while connecting
- From: Etan Kissling <email@hidden>
- Date: Sun, 16 Dec 2012 21:24:45 +0000
- Thread-topic: deallocation while connecting
Regarding the delayed disconnects, one common trick is to add an additional
characteristic on the peripheral that terminates the connection on write.
Regarding ARC: true, it makes things easier - however, you still have to know
about the memory model in order to understand why you have to store the
peripheral in an instance variable.
wrote:
On Fri, Dec 14, 2012 at 1:40 AM, Etan Kissling
<email@hidden> wrote:
Even with ARC you have to make sure that the peripheral is retained. ARC does nothing magically, it only inserts automatic retain / release calls where it knows that they are usually required.
Sure, it's just a whole lot easier to get things right with ARC.
On Fri, Dec 14, 2012 at 2:21 AM, Andras Kovi
<email@hidden> wrote:
My experience is that this is a benign error.
It's often a sign of a retain count bug, so I think it's useful.
> Finally, the link to the peripheral is kept alive by iOS for 50 or so seconds. It causes more issues than it cures but we have to live with it.
It would be better if you could control whether it happens. It's usually convenient and improves UX, but sometimes you really do need to disconnect the device immediately (eg. if the user has indicated that he wants it disconnected, perhaps so it can be connected
to a different iPad).
--
Glenn Maynard
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden