Python Professional — Hard
Key points
- `weakref.ref()` creates a non-intrusive reference to objects
- It does not prevent objects from being garbage collected
- Useful for implementing caches or monitoring objects without impacting memory management
Ready to go further?
Related questions
