(&mut self)
| 27 | |
| 28 | impl 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 | |
| 42 | impl PyNode { |