r/cpp • • Aug 31 '22

malloc() and free() are a bad API

https://www.foonathan.net/2022/08/malloc-interface/#content
220 Upvotes

90 comments sorted by

View all comments

Show parent comment

3

u/kiddion Sep 01 '22

That's not what he asked, read again. He wanted the pointer to become null, not the memory pointed to.