all: fix memory leaks
This commit is contained in:
parent
e212e0b8b1
commit
9904717c71
18 changed files with 149 additions and 10 deletions
|
|
@ -27,7 +27,9 @@ pub fn handle(state: &Rc<State>, connector: &Rc<dyn Connector>) {
|
|||
};
|
||||
let future = state.eng.spawn(oh.handle());
|
||||
data.handler.set(Some(future));
|
||||
state.connectors.set(id, data);
|
||||
if state.connectors.set(id, data).is_some() {
|
||||
panic!("Connector id has been reused");
|
||||
}
|
||||
}
|
||||
|
||||
struct ConnectorHandler {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue