Re: Peripheral dealloced while connecting under ARC?
Re: Peripheral dealloced while connecting under ARC?
- Subject: Re: Peripheral dealloced while connecting under ARC?
- From: Andras Kovi <email@hidden>
- Date: Sat, 09 Mar 2013 10:29:12 +0100
Yes, but if you release your instance, then a new instance is created automatically. If you are connected to multiple peripherals, then this can cause significant overhead and lots of mem allocations. I'm not completely sure but I can imagine that this new instance is not going to have the same state as the old one had; however, this statement has to be checked but I don't have the means to do it now.
Anyway, there are probably well founded reasons why the framework does not retain the peripheral object and we have to live with these decisions for now. If you feel like this is a great pain in the neck, then you can always submit a bug to Apple.
Regards,
Andras
On 2013.03.09., at 10:12, Rick Mann <email@hidden> wrote:
>
> On Mar 9, 2013, at 00:18 , Andras Kovi <email@hidden> wrote:
>
>> The problem with requiring the system to retain the peripheral is that once you receive the callback you wouldn't be able to determine which peripheral's interaction initiated the callback. You could say the UUID would be enough. But then having the peripheral stored alongside is not a huge addition. It's annoying and not well documented but can be circumvented easily with some tricks.
>
> Not sure I understand what you're saying here; the peripheral is passed to the callback.
>
> --
> Rick
>
>
>
_______________________________________________
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