this post was submitted on 05 Aug 2024
205 points (92.5% liked)

Programmer Humor

19145 readers
808 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

A screenshot from youtube, Virbox

top 18 comments
sorted by: hot top controversial new old
[–] xmunk@sh.itjust.works 52 points 1 month ago (1 children)

Eh... ship it. RAM is cheap.

[–] palordrolap@kbin.run 31 points 1 month ago (1 children)

"Uh, Boss, our customers are sending us the invoices for their RAM purchases."

[–] independantiste@sh.itjust.works 47 points 1 month ago (1 children)

OMG I SHOULD HAVE DONE THAT TO JETBRAINS AND MICROSOFT FOR TEAMS

[–] 30p87@feddit.org 32 points 1 month ago (1 children)

Also electron. Because somehow a full blown separate FF instance is more ram efficient than electron.

[–] entropicdrift@lemmy.sdf.org 4 points 1 month ago

Well, Electron uses Chrome, so yes

[–] Blue_Morpho@lemmy.world 39 points 1 month ago (1 children)

That's why I preallocate the max memory I will need just like I was taught to do in Fortran. You can't leak what you don't have.

[–] CanadaPlus@lemmy.sdf.org 14 points 1 month ago

Heap allocation failure > gradual memory leak

Checkmate atheists.

[–] SpaceNoodle@lemmy.world 26 points 1 month ago (4 children)

This is why I only allocate on the stack

[–] xmunk@sh.itjust.works 19 points 1 month ago (2 children)

People who are enthusiastic about using pointers in C++ are doing it wrong. Never use a pointer when you can get away with a reference.

[–] KindaABigDyl@programming.dev 23 points 1 month ago

For C++, yes. But "reference" is just a way of using the pointer when it comes to C

[–] SpaceNoodle@lemmy.world 8 points 1 month ago

Sure, but that's technically allocation-agnostic either way.

[–] ryannathans@aussie.zone 13 points 1 month ago (1 children)

Based nasa compliant engineer

[–] SpaceNoodle@lemmy.world 9 points 1 month ago

This guy gets it

Static allocation for the SIL ratings

[–] magic_lobster_party@kbin.run 12 points 1 month ago

Stack overflow intensifies

[–] 30p87@feddit.org 3 points 1 month ago

I only use the registers.

[–] RacoonVegetable@reddthat.com 18 points 1 month ago

~I’m sorry~

rip random amiga machine

[–] Beanie@programming.dev 1 points 1 month ago

The line causing the memory leaks is actually the lack of a line: free().