MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / drop

Method drop

flow-rs/src/loader/python/node.rs:29–39  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

27
28impl Drop for PyNode {
29 fn drop(&mut self) {
30 Python::with_gil(|py| {
31 if !self.imp.as_ref(py).hasattr("__del__").unwrap() {
32 return;
33 }
34 if let Err(err) = self.imp.call_method0(py, "__del__") {
35 err.print(py);
36 panic!("python node {} __del__ fault!", self.name);
37 }
38 });
39 }
40}
41
42impl PyNode {

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected