this post was submitted on 05 Aug 2024
212 points (92.7% liked)

Programmer Humor

19812 readers
165 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 2 years ago
MODERATORS
 

A screenshot from youtube, Virbox

top 18 comments
sorted by: hot top controversial new old
[–] [email protected] 54 points 4 months ago (1 children)

Eh... ship it. RAM is cheap.

[–] [email protected] 32 points 4 months ago (1 children)

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

[–] [email protected] 48 points 4 months ago (1 children)

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

[–] [email protected] 33 points 4 months ago (1 children)

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

[–] [email protected] 5 points 4 months ago

Well, Electron uses Chrome, so yes

[–] [email protected] 41 points 4 months 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.

[–] [email protected] 14 points 4 months ago

Heap allocation failure > gradual memory leak

Checkmate atheists.

[–] [email protected] 26 points 4 months ago (4 children)

This is why I only allocate on the stack

[–] [email protected] 19 points 4 months 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 23 points 4 months ago

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

[–] [email protected] 8 points 4 months ago

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

[–] [email protected] 13 points 4 months ago (1 children)

Based nasa compliant engineer

[–] [email protected] 9 points 4 months ago

This guy gets it

Static allocation for the SIL ratings

[–] [email protected] 12 points 4 months ago

Stack overflow intensifies

[–] [email protected] 3 points 4 months ago

I only use the registers.

[–] [email protected] 20 points 4 months ago

~I’m sorry~

[–] [email protected] 5 points 4 months ago

rip random amiga machine

[–] Beanie 2 points 4 months ago

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