3 ms·
In higher-level languages, object lifetime is more than just whether the memory is there or not; it's also about whether the usual invariants apply. For exampl
by int_19h 10y ago
In higher-level languages, object lifetime is more than just whether the memory is there or not; it's also about whether the usual invariants apply.
For example, in C#, you need to Dispose() objects that are logically no longer used, to have them properly cleaned up. Using an object after it's disposed typically results in an ObjectDisposedException. This isn't as bad as a segfault, but ultimately it's still a crashing bug in the app - and solving it requires figuring out who needs to call Dispose when - i.e. figuring out the lifetime.