Did you like how we did? Rate your experience!

4.5

satisfied

46 votes

Do C programmers feel tired to manually manage memory?

Speaking solely on behalf of myself (as, among others, a C-programmer): I dont. I instead feel more confident in the performance characteristics of my application. (Although, it would be possible to feel tired as well as empowered. But still no, not tired.) TS;WM: By comparison: Ive felt more tired when having to work around the erratic nature of certain garbage collectors. As once systems have reached that level of complexity/performance cost while using such garbage collected technologies Ive found it way harder to solve it. Do I have to chase forgotten references? Do I have to ensure the collector doesnt block for several ms at particular bad times? Do I have to chase it with a whip and tweak every parameter to ensure it doesnt reserve/block more memory than desired? They all employ heuristics to how and when to collect. This comes at a cost. It might be acceptable in your particular scenario (hooray) - but they do have a cost which you might sooner or later need to come to terms with. EDIT 1: I.e. I still end up manually managing memory (by managing the manager). I might just have been unlucky to work at improperly designed system, or just showing my own incompetence here. But by my experience: nothing is free. And then of course you might have reference-count based solutions which falls somewhere in the middle. You can to a greater degree foresee and control how they affect your system. EDIT 2: It would however have been nicer with a simpler way of specifying the free/release-code together with the allocation/acquisition-code, but still have it executed at scope end in proper order. (And no, C++s RAII is also not what Im describing here.)

100%
Loading, please wait...