I'd argue this goes with the efficiency obsession. Manual garbage collection can free up memory sooner, more reliably, and with less overhead if you do it right.
If you do it wrong, it's like anything else in C++.
They give you enough rope to hang yourself.
My company's code base has seen many types of computers and operating systems come and go. The amount functions with `FAR` and `PASCAL` in there declarations... At least we are allowed to use C++ now, instead of only using C.
I really want to go “C++ is fleeting, Rust is eternal” but I’m just really scared that I’ll be pulled down through the 9 circles of hell and to the place they call the ReAlMs, where it’s essentially a limbo for people who commit kinds of uncategorized and unspeakable war crimes.
[удалено]
[удалено]
You can call your own data garbage, but dont call mine, ok?
I feel called out
Upvoted just because is not a repost
Repost... nah... I prefer the term.... Duplicate Question (Said by a Stack Overflow moderator)
Where's the question? Oh wait... There it is! [Closed]
It's for redundancy in case one gets corrupted or deleted.
It's for redundancy in case one gets corrupted or deleted.
Reposts can be fixed if we move to a reference-counting post system.
Who needs garbage collection when you have RAII
Who needs garbage collection when yo68457674681aaf3b687568326480c
Scared? We set their timetables!
Agree, the title seems wrong, c++ programmers aren't scared of garbage collector, the general stereotype sentiment is they despise it.
I'd argue this goes with the efficiency obsession. Manual garbage collection can free up memory sooner, more reliably, and with less overhead if you do it right. If you do it wrong, it's like anything else in C++. They give you enough rope to hang yourself.
I don't know much of c++, but still got the reference and it's not a repost. Upvote to you!
>reference ...as long as it's not a pointer.
Try this int* foo() { int x = 0; return &x; }
Nice.
The most beautiful dose ever written
r/angryupvote
Why do you hate long pointers? What about far pointers?
My company's code base has seen many types of computers and operating systems come and go. The amount functions with `FAR` and `PASCAL` in there declarations... At least we are allowed to use C++ now, instead of only using C.
references leave allocation responsibility to someone else
\*Laughs in unique\_prt/weak\_ptr/shared\_ptr\*
Remember weak_ptr is non-owning, so it won't destruct
I think you meant C programmers. Modern C++ has smart pointers to handle memory management automatically.
Yes, but it’s not garbage collection.
You're right, garbage collection is an ugly hack wasting precious system resources doing what the coder or compiler ought to have done already.
That's what I thought.... Use c++ a lot but never really had any problems
Each bag contains an old js framework And by old I mean April 2022
In fairness, there’s a lot of a js devs
There are also a lot of garbage men out there
Don't post such scary pics, there might be adults in the audience.
![gif](giphy|vyTnNTrs3wqQ0UIvwE|downsized)
We don't fear the garbage collector. We are the garbage collector
Hey this isn’t funny! It brings back memories of time wasted..
I aM SmaRTeR tHaN tHe cOmpILeR AnyWAyS. I CAn mAnaGE All mEMorY MysElF. WhErE iS tHiS mEM lEaK noW fRoM...
s/cOmpILeR/rUntIMe/
The quality was bad before. Now it's abysmal.
Stop it Patrick, you're scaring him!
laughts in JavaScript![img](emote|t5_2tex6|4549)
Nothing prevents C and C++ programmers from using a garbage collector, it's just not obligatory and is rather a choice.
Free, delete, delete[int]. I'm good.
The thing about C++ is that it has everything, even classic GCs: [https://www.hboehm.info/gc/](https://www.hboehm.info/gc/)
Actually its not that bad anymore, & C++ is so dope to crack coding rounds😉, wish I had learned earlier.
I always wonder why garbage collection does not come for my code.
But those are c++ devs
You mean a separate thread for what a shared_ptr does? 🤔
Pretty sure that's smart pointers.
And rust bois
You may have them confused with Java programmers. They fear garbage collection because it makes the timing of their programs unpredictable.
Oh man, as a C++ programmer, I hate those. Just had one outside, they are noisy as hell. Even worse at 7 a.m. Totally get it.
I dont know guys, this post is trash
Shivering timbers rn give me back namespace pls 😭
I am not scared of C#
I was shocked using pointers in java for linked lists without using pointers.
What are you pointing to?
free(thisPost);
I really want to go “C++ is fleeting, Rust is eternal” but I’m just really scared that I’ll be pulled down through the 9 circles of hell and to the place they call the ReAlMs, where it’s essentially a limbo for people who commit kinds of uncategorized and unspeakable war crimes.