Get the referents (objects directly referenced) of this object. Uses the full traverse including dict and slots.
(&self)
| 1682 | /// Get the referents (objects directly referenced) of this object. |
| 1683 | /// Uses the full traverse including dict and slots. |
| 1684 | pub fn gc_get_referents(&self) -> Vec<PyObjectRef> { |
| 1685 | let mut result = Vec::new(); |
| 1686 | self.0.traverse(&mut |child: &PyObject| { |
| 1687 | result.push(child.to_owned()); |
| 1688 | }); |
| 1689 | result |
| 1690 | } |
| 1691 | |
| 1692 | /// Call __del__ if present, without triggering object deallocation. |
| 1693 | /// Used by GC to call finalizers before breaking cycles. |
no test coverage detected