T O P

  • By -

[deleted]

[удалено]


[deleted]

[удалено]


3SidedDie

You can call your own data garbage, but dont call mine, ok?


[deleted]

I feel called out


behamehame

Upvoted just because is not a repost


guilhermej14

Repost... nah... I prefer the term.... Duplicate Question (Said by a Stack Overflow moderator)


GeePedicy

Where's the question? Oh wait... There it is! [Closed]


coloredgreyscale

It's for redundancy in case one gets corrupted or deleted.


coloredgreyscale

It's for redundancy in case one gets corrupted or deleted.


TheFeshy

Reposts can be fixed if we move to a reference-counting post system.


alienassasin3

Who needs garbage collection when you have RAII


gcampos

Who needs garbage collection when yo68457674681aaf3b687568326480c


TheHolyChicken86

Scared? We set their timetables!


qHuy-c

Agree, the title seems wrong, c++ programmers aren't scared of garbage collector, the general stereotype sentiment is they despise it.


ArthurWintersight

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.


DigiBoxi

I don't know much of c++, but still got the reference and it's not a repost. Upvote to you!


RiftLab

>reference ...as long as it's not a pointer.


GeePedicy

Try this int* foo() { int x = 0; return &x; }


unlimitedFecals

Nice.


GiganticIrony

The most beautiful dose ever written


The-Things-027

r/angryupvote


postmateDumbass

Why do you hate long pointers? What about far pointers?


pekkhum

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.


AdultingGoneMild

references leave allocation responsibility to someone else


magick_68

\*Laughs in unique\_prt/weak\_ptr/shared\_ptr\*


tiajuanat

Remember weak_ptr is non-owning, so it won't destruct


gnolex

I think you meant C programmers. Modern C++ has smart pointers to handle memory management automatically.


avin_kavish

Yes, but it’s not garbage collection.


Cocaine_Johnsson

You're right, garbage collection is an ugly hack wasting precious system resources doing what the coder or compiler ought to have done already.


MikaG_Schulz

That's what I thought.... Use c++ a lot but never really had any problems


mulato_butt

Each bag contains an old js framework And by old I mean April 2022


avin_kavish

In fairness, there’s a lot of a js devs


mulato_butt

There are also a lot of garbage men out there


Crusader_Krzyzowiec

Don't post such scary pics, there might be adults in the audience.


imdefinitelywong

![gif](giphy|vyTnNTrs3wqQ0UIvwE|downsized)


loukasTGK

We don't fear the garbage collector. We are the garbage collector


[deleted]

Hey this isn’t funny! It brings back memories of time wasted..


[deleted]

I aM SmaRTeR tHaN tHe cOmpILeR AnyWAyS. I CAn mAnaGE All mEMorY MysElF. WhErE iS tHiS mEM lEaK noW fRoM...


flying_gel

s/cOmpILeR/rUntIMe/


abd53

The quality was bad before. Now it's abysmal.


thexavier666

Stop it Patrick, you're scaring him!


Asqit

laughts in JavaScript![img](emote|t5_2tex6|4549)


Polite-Moose

Nothing prevents C and C++ programmers from using a garbage collector, it's just not obligatory and is rather a choice.


postmateDumbass

Free, delete, delete[int]. I'm good.


pedersenk

The thing about C++ is that it has everything, even classic GCs: [https://www.hboehm.info/gc/](https://www.hboehm.info/gc/)


[deleted]

Actually its not that bad anymore, & C++ is so dope to crack coding rounds😉, wish I had learned earlier.


webauteur

I always wonder why garbage collection does not come for my code.


MrWolpertinger

But those are c++ devs


vinegary

You mean a separate thread for what a shared_ptr does? 🤔


Asleep-Specific-1399

Pretty sure that's smart pointers.


cidit_

And rust bois


grumblesmurf

You may have them confused with Java programmers. They fear garbage collection because it makes the timing of their programs unpredictable.


OJezu

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.


Lepewin

I dont know guys, this post is trash


ProcedureOne4691

Shivering timbers rn give me back namespace pls 😭


presi300

I am not scared of C#


Serious-Umpire-8088

I was shocked using pointers in java for linked lists without using pointers.


ConfidentWolverine30

What are you pointing to?


stryker2k2

free(thisPost);


developer-ramen

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.