3 ms·
C# has disposable objects (an interface), they require you to call dispose manually, though the "using" syntax makes this automatic once the variable goes out o
by lillecarl 5y ago
C# has disposable objects (an interface), they require you to call dispose manually, though the "using" syntax makes this automatic once the variable goes out of scope so unless you're passing the object with an FD around you don't really notice it. Though if you miss the using on a disposable object you're leaking, so you need tooling to help you remember.
That's how they solve it, C# is my fav language, but it's probably because I've only really spent time in C++ and C#, the rest is just "scripting". So the syntax is familiar.