32 subscribers
התחל במצב לא מקוון עם האפליקציה Player FM !
פודקאסטים ששווה להאזין
בחסות


1 Reuven Bank and Andrew Kim: When the Ocean Lost Its Stars 30:54
PyObject preservation
Manage episode 294513501 series 2921809
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.
- PyObject preservation PR https://github.com/pytorch/pytorch/pull/56017
- Sam Gross's original PoC, which works fine if the two objects in question are both PyObjects https://github.com/colesbury/refcount/
- PEP 442 Safe object finalization https://www.python.org/dev/peps/pep-0442/
- Essential reading about Python GC https://devguide.python.org/garbage_collector/
83 פרקים
Manage episode 294513501 series 2921809
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.
- PyObject preservation PR https://github.com/pytorch/pytorch/pull/56017
- Sam Gross's original PoC, which works fine if the two objects in question are both PyObjects https://github.com/colesbury/refcount/
- PEP 442 Safe object finalization https://www.python.org/dev/peps/pep-0442/
- Essential reading about Python GC https://devguide.python.org/garbage_collector/
83 פרקים
همه قسمت ها
×














ברוכים הבאים אל Player FM!
Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.