Participate in an interesting problem and do not make sure how to manage it.
What would be the best way to handle the AVAudioPlayer callback method, for example, for example, an event of the aviadio player was created with the callback to the audio end but the aviadio player (and The callback) object is distributed before the audio is over?
This is my current situation where the app is constantly crashing because now a non-existent callback method is trying to call.
While thinking about this, the answer should probably be a way to destroy or cancel the callback methods of callback.
You have to keep track of everything registered for "callback" and give them the -dealloc
in, like-
- (zero) dealloc {// If you have registered for the information, do something like this: [[NSNotificationCenter defaultCenter] DeleteAbSaver: Self] ; // If you are representative of something, do something like: self.audioPlayer.delegate = noil; Self.audioPlayer = Zero; [Super DeLoc]; }
There is no magic method for everything for any indicator feels that it can be an indicator for you And it can zero. Loads of problems with that attitude (not limited to Sludusuo ...).
Comments
Post a Comment