|
|
|
|
|
by CyberDildonics
313 days ago
|
|
Also, I'm not so sure smart pointers and destructors actually prevent memory leaks Well, they do, that's why people use them. I'm not sure why you would make the case against using another language that makes management manual. Also reference counting cycles are only even possible if you use reference counting in the first place, which isn't necessary for single threaded scope based memory management. Java does prevent leaks due to cycles Fantastic but you said zig is safe than C++, what does java have to do with it? |
|
They're one of the ways of reducing, not preventing memory leaks. And they're pretty ok at that, but I find other approaches to work better for me.