Hacker News new | past | comments | ask | show | jobs | submit login

> what happens if you forget to free a pointer in c?

Assuming you mean 'forget' to free malloc'd space referenced by at least one pointer, that's an easy one .. it's reclaimed by the OS when the process ends.

Whether that's a bad thing or not really depends on context - there are entire suites of interlocked processing pipelines built about the notion of allocating required resources, throughputing data, and terminating on completion - no free()'s




surely my salient point is recognized regardless of semantics, but thanks for the correction. To use another example in another post - what happens if you DROP TABLE in sql?


DROP TABLE is explicit. Inadvertently removing a line from a config file and having Postgres decide to automatically "clean up" that "unneeded table" would be a more apt analogy.


What happens is that you call Iron Mountain and find out that those tapes don't actually have anything useful on them.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: