private var synthesizer: AVSpeechSynthesizer?
deinit {
self.synthesizer?.delegate = nil
//this is comment for ios 16+ if not app crashed
//synthesizer = nil
}
when
synthesizer = nil
my app is crashed when comment this line all work ok
Post
Replies
Boosts
Views
Activity
private var synthesizer: AVSpeechSynthesizer? this is my variable.
i have in deinit:
deinit {
synthesizer?.delegate = nil
synthesizer = nil
}
when i comment synthesizer = nil crash app not crashed