top | item 45479681

(no title)

elmigranto | 4 months ago

Use managed language, it will handle memory stuff for you, you don’t have to care.

But also read these 400 articles to understand our GC. If you are lucky, we will let you change 3 settings.

discuss

order

phito|4 months ago

It works just fine out of the box. The articles/manuals are just if you want to really understand how it works and get the most out of it. What's the issue with that?

CharlieDigital|4 months ago

In my 20+ years using C#, there's only been one instance where I needed to explicitly control some behavior of the GC (it would prematurely collect the managed handle on a ZMQ client) and that only required one line of code to pin the handle.

It pretty much never gets in your way for probably 98% of developers.

pjmlp|4 months ago

Dr. Dobbs and The C/C++ Users Journal archives are full of articles and ads for special memory allocators, because the ones on the standard library for C or C++ also don't work in many cases, they are only good enough as general purpose allocation.

samus|4 months ago

You need these settings when you drive your application hard into circumstances where manual memory allocation arguably starts making sense again. Like humongous heaps, lots of big, unwieldy objects, or tight latency (or tail latency) requirements. But unless you're using things like Rust or Swift, the price of memory management is the need to investigate segmentation faults. I'd prefer to spend developer time on feature development and benchmarking instead.