4 ms·
Or you could use attributes... https://www.reddit.com/r/embedded/comments/gt8vsc/using_raii_in_c_for_fun_and_profit/ https://www.reddit.com/r/embedded/comments
by spacedcowboy 6y ago
Or you could use attributes...
https://www.reddit.com/r/embedded/comments/gt8vsc/using_raii_in_c_for_fun_and_profit/ https://www.reddit.com/r/embedded/comments/gt8vsc/using_raii...
- taeber 6y agoYes you can. I did mention GCC's cleanup attribute along with MSVC's try-finally construct. Another user was kind enough to even provide an example in their GitHub issue: https://github.com/taeber/cwith/issues/1 https://github.com/taeber/cwith/issues/1.