logoalt Hacker News

nirei • yesterday at 6:53 PM • 1 reply • view on HN

How does it free memory? I don't get it. I browsed the docs a bit but didn't find a single reference to deallocation. There's alloc for heap allocation but no free?


Replies

christophilus • yesterday at 6:58 PM

In the standard library, there are some allocators with free, so it looks like you’re expected to call those. It is strange that none of the examples seem to cover this, though.