News for hackers. Stuff that matters.
Re:Why the C Programming Language Sucks by EmanueleAina on Friday August 21, 2015 @10:39AM (#10097742)
To some extents, it depends on the definition of C: by the standard, you're right, you can't. But with some relatively common (GCC and clang) extension (ie. __attribute__((cleanup))) you definitely can, see g_autoptr() from GLib for an easy way to use it: https://blogs.gnome.org/desrt/2015/01/30/g_autoptr/

There are no comments on this comment yet.