Hacker News new | ask | show | jobs
by baash05 1603 days ago
Sit in a room and point at a spot on the floor.

You are a pointer, pointing at nothing.

Attempt to put shit where you're pointing and you have shite all over the floor.

Malloc creates a bucket. Now when you put shit where you're pointing it lands in a bucket.

When you're done with the bucket you clean it up.

If you try to put too much in the bucket, you end up with shite all over the floor.

If you forget to clean up the bucket, the place will start to stink.

If you change the pointer so nothing is pointing at the bucket of shit, then it will just sit there, forgotten. But the shit is still there.

No one ever forgets this way of teaching it.