Re:Show HN: Smart pointers for the C programming language
by eatonphil on Wednesday January 14, 2015 @03:24PM
(#8888776)
Wow, 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!
Re:Show HN: Smart pointers for the C programming language
by Snaipe on Wednesday January 14, 2015 @04:13PM
(#8889101)
I'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 ! :)
Re:Show HN: Smart pointers for the C programming language
by sepeth on Wednesday January 14, 2015 @03:40PM
(#8888870)
I 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.
Re:Show HN: Smart pointers for the C programming language
by Snaipe on Wednesday January 14, 2015 @04:11PM
(#8889089)
Yep, 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.
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.