← Back to context

Comment by bb88

1 year ago

No.. Go did a half-assed version of reference counting on resources. Memory yes. File descriptors, no so much.

Edited to add: What's the point of continuing to discuss this if all you understand is .NET and not actually tried to manage C/C++ resources (without using boost smart pointers) by hand?

FWIW Go doesn't do any reference counting, its GC implementation is a concurrent mark and sweep. And also file descriptors are subject to the same mechanism, a finalizer is set on them and they will be closed when the associated object is collected.