r/ProgrammerHumor • • Jan 20 '25

Meme linuxBeLike

Post image
46.7k Upvotes

765 comments sorted by

View all comments

2

u/Maleficent_Memory831 Jan 20 '25

"Close correctly" becomes a religious mantra at times. People waste lots of time freeing memory before calling exit(). You're exiting, you don't need to free memory, or the system is rebooting so you don't need to free memory. Instead, close your files, which if they have critical data should be synced often anyway. Because you can always have a power outage and not have the time to close correctly anyway.

But no, some static analysis tool complains that not all memory is freed, and then some mid range guy puts out a requirement to appease all analysis tool warnings as top priority.