mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 18:20:51 +00:00
Fix Closure::forget
It forgot to actually forget the contents!
This commit is contained in:
parent
9c085dc0f5
commit
727e0a7154
@ -232,10 +232,8 @@ impl<T> Closure<T>
|
||||
/// cleanup as it can.
|
||||
pub fn forget(self) {
|
||||
unsafe {
|
||||
let idx = self.js.idx;
|
||||
if idx != !0 {
|
||||
super::__wbindgen_cb_forget(idx);
|
||||
}
|
||||
super::__wbindgen_cb_forget(self.js.idx);
|
||||
mem::forget(self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user