Re:Show HN: I wrote my own RTS game engine in C
by jstimpfle on Wednesday May 12, 2021 @10:50PM
(#27137893)
Some people like to make a defer macro like this:
Those can be easily stacked
Here is a memory arena macro.
[ Parent
| on HN ]
Re:Show HN: I wrote my own RTS game engine in C
by jnwatson on Wednesday May 12, 2021 @11:17PM
(#27138033)
gcc and llvm have a cleanup attribute you can use for this. Systemd uses it.
https://fdiv.net/2015/10/08/emulating-defer-c-clang-or-gccbl...