I have created an accelerometer variable:
UIAccelerometer *objAccelerometer;
that I am associating to the sharedAccelerometer instance:
objAccelerometer = [UIAccelerometer sharedAccelerometer];
objAccelerometer.delegate = self;
When I release this view (to load a different view), the accelerometer instance causes the program to die. (If I have it commented out, I can switch between views without a problem).
I had a similar problem with an NSTimer, but once I called:
[myTimer invalidate];
(prior to releasing and switching the views) everything worked fine.
How should I properly release the delegate or deallocate or release the accelerometer?