4 ms·
Lifetime analysis matters a lot for way more than just garbage collection. File handles, iterators, mutex guards, database transaction handles, session types,
by tene 3y ago
Lifetime analysis matters a lot for way more than just garbage collection.
File handles, iterators, mutex guards, database transaction handles, session types, scoped threads, anything where ordering or mutual exclusivity matters.
- robertlagrant 3y agoI don't know about all of those, but Python's context managers and built in constructs handle most of those, I think?
- Too 3y agoOnly in the most basic cases. If your handle has to be passed into another function or outlive the current scope of your function, the guardrails end.