Add `Drop` implementation.

This commit is contained in:
Nolan Darilek 2020-08-12 09:52:16 -05:00
parent 47bfe768e6
commit 427ca027be
1 changed files with 9 additions and 0 deletions

View File

@ -132,3 +132,12 @@ impl Backend for NSSpeechSynthesizerBackend {
unimplemented!()
}
}
impl Drop for NSSpeechSynthesizerBackend {
fn drop(&mut self) {
unsafe {
let _: Object = msg_send!(self.0, release);
let _: Object = msg_send!(self.1, release);
}
}
}