6 ms·
Article: http://snaipe.me/c/c-smart-pointers/ http://snaipe.me/c/c-smart-pointers/ Feedback appreciated, be it on the article, project or website ! Be wary tha
by Snaipe 12y ago
Article: http://snaipe.me/c/c-smart-pointers/ http://snaipe.me/c/c-smart-pointers/
Feedback appreciated, be it on the article, project or website ! Be wary that english is not my mother tongue, so there might be some grammatical weirdities and such.
- eatonphil 12y agoWow, this is seriously great! This is exactly what I needed for my project, Viola[1], that provides an abstraction on top of libCello[2] to allow you to write really high-level C. This really helps make Viola a little more high-level. I am really grateful for your blog post! [1] - https://github.com/eatonphil/Viola https://github.com/eatonphil/Viola [2] - https://github.com/orangeduck/libCello https://github.com/orangeduck/libCello
- Snaipe 12y agoI've read with great interest the source of libCello when I first saw it a few days ago on reddit, it seems like a fun experiment. Good luck with your project ! :)
- sepeth 12y agoI first thought about wrapping malloc to register all allocated data, and then free everything before exiting, but it wasn’t a satisfying solution. Quick question, Isn't this the same with just leak all the memory that you've allocated. Because, after a process died, operating system will just take it back the memory it used.
- Snaipe 12y agoYep, but if I just let the system get all the memory back, valgrind would have yelled at us for leaking memory, and it would have been detected by the testing system, slapping us in the face with a malus on our final grade.