Podcast Lookup

PyObject preservation

PyTorch Developer Podcast

  • June 9, 2021
  • 16 min
  • Episode 26
Episode page

About this episode

Given two separately refcounted objects, how can you arrange for each of them to stay live so long as the other is live? Why doesn't just having a strong-strong or strong-weak reference between the two objects work? What is object resurrection in CPython? What's a finalizer and why does it make things more complicated? How does Python GC work?

Further reading.