r/ProgrammerHumor 2d ago

Meme bugIntroducedDebugging

Post image
1.1k Upvotes

120 comments sorted by

View all comments

1

u/LostgamerFJ 2d ago

I'm not good enough at programming for this. What do the "free" and "malloc" functions do?

6

u/Independent_Spell_55 2d ago

If I remember correctly, Malloc allocates memory, and I assume free would free up that memory, so when the variable is returned it doesn’t exist. I don’t have much experience with manual memory management so take anything I said with a grain of salt.

1

u/Mateorabi 2d ago

“If I remember correctly”. Please hand in your programmer badge and compiler to the officer at the front desk.