all: fix memory leaks
This commit is contained in:
parent
56e3eee629
commit
e5c0916a25
15 changed files with 147 additions and 54 deletions
|
|
@ -132,6 +132,10 @@ impl Wheel {
|
|||
Ok(Rc::new(Wheel { data }))
|
||||
}
|
||||
|
||||
pub fn clear(&self) {
|
||||
self.data.kill();
|
||||
}
|
||||
|
||||
fn future(&self) -> WheelTimeoutFuture {
|
||||
let data = self.data.cached_futures.pop().unwrap_or_else(|| {
|
||||
Rc::new(WheelTimeoutData {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue