Я работаю с графиком акселерометра Apple. Пример: http://developer.apple.com/library/ios/#samplecode/AccelerometerGraph/Introduction/Intro.html
Я загружаю 2 вида графика на контроллер навигации:
GraphViewController* graphViewController = [[GraphViewController alloc]initWithNibName:@"GraphViewController" bundle:nil];
[self.navigationController pushViewController:graphViewController animated:YES];
[graphViewController release];
Графики обновляются внешнимметод:
[motionManager startDeviceMotionUpdatesToQueue:motionQueue withHandler:^(CMDeviceMotion *motion, NSError *error) {
...
if(graphDelegate)
{
[self performSelectorInBackground:@selector(notifyGraphDelegateWithMotionEvent:) withObject:motion];
}
}
, который вызывает
[unfiltered addX:filteredValue y:unfilteredvalue z:10];
для каждого графика.Частота обновлений составляет 20 раз в секунду
Когда я выскакиваю представление из контроллера навигации, после [super dealloc]
-(void)dealloc
{
// Since 'text' and 'current' are weak references, we do not release them here.
// [super dealloc] will take care to release 'text' as a subview, and releasing 'segments' will release 'current'.
[segments release];
[super dealloc];
}
появляется неприятная ошибка, и яна самом деле не знаю, как решить эту проблему.Похоже, что-то в порядке, в котором представления распределяются, поскольку сбой происходит после того, как представление извлечено.Любые идеи о том, как устранить что-то подобное?