Re: RFC: glocal - automatically freeing memory when it goes out of scope



On Wed, 2011-11-16 at 21:05 +0100, Mikkel Kamstrup Erlandsen wrote:
> Hi all,
> 
> I have been looking at gcc's "cleanup" attribute[1] that allows one to 
> specify a callback that will be invoked when a variable goes out of 
> scope. This allows one to play with automatically freeing resources.

So this is frankly pretty cool - but we can't make GLib/GTK+
dependent on GNU C.

I could imagine using this in some gcc/Linux-specific parts of GNOME
though; care to polish up the header, and we could put it somewhere it
can be shared/reused (not sure where...libegg?)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]