zlacker

[parent] [thread] 3 comments
1. bb88+(OP)[view] [source] 2023-12-31 08:40:30
You've clearly never coded in C/C++ where it's your job as the coder to manage memory and other resources.
replies(1): >>jayd16+v
2. jayd16+v[view] [source] 2023-12-31 08:47:58
>>bb88+(OP)
I'm confused. Are your comments only relevant to C/C++ when the thread is about Go and the question was what any language should do? Personally I was thinking about garbage collected finalizers such as in Java.
replies(1): >>bb88+Q
◧◩
3. bb88+Q[view] [source] [discussion] 2023-12-31 08:55:31
>>jayd16+v
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?

replies(1): >>EdiX+Q1
◧◩◪
4. EdiX+Q1[view] [source] [discussion] 2023-12-31 09:10:12
>>bb88+Q
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.
[go to top]