Skip to main content

You should definitely be releasing both btMonitoredDevicesbtMonitoredDevices and btPairedDevicesbtPairedDevices in the deallocdealloc. But it appears that this is your appDelegate so it matters little outside of correctness. I'd do it anyhow.

You shouldn't need the retainretain on btMonitoredDevicesbtMonitoredDevices since you're calling allocalloc on it. So you already have a retainretain count of one on it. By calling retainretain on it you actually have a retainretain count of two.

So to sum up make sure you're releasing both in your deallocdealloc and get rid of the [btMonitedDecices retain];[btMonitedDecices retain]; and you should be good.

You should definitely be releasing both btMonitoredDevices and btPairedDevices in the dealloc. But it appears that this is your appDelegate so it matters little outside of correctness. I'd do it anyhow.

You shouldn't need the retain on btMonitoredDevices since you're calling alloc on it. So you already have a retain count of one on it. By calling retain on it you actually have a retain count of two.

So to sum up make sure you're releasing both in your dealloc and get rid of the [btMonitedDecices retain]; and you should be good.

You should definitely be releasing both btMonitoredDevices and btPairedDevices in the dealloc. But it appears that this is your appDelegate so it matters little outside of correctness. I'd do it anyhow.

You shouldn't need the retain on btMonitoredDevices since you're calling alloc on it. So you already have a retain count of one on it. By calling retain on it you actually have a retain count of two.

So to sum up make sure you're releasing both in your dealloc and get rid of the [btMonitedDecices retain]; and you should be good.

Source Link

You should definitely be releasing both btMonitoredDevices and btPairedDevices in the dealloc. But it appears that this is your appDelegate so it matters little outside of correctness. I'd do it anyhow.

You shouldn't need the retain on btMonitoredDevices since you're calling alloc on it. So you already have a retain count of one on it. By calling retain on it you actually have a retain count of two.

So to sum up make sure you're releasing both in your dealloc and get rid of the [btMonitedDecices retain]; and you should be good.