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

On Sun, 2012-05-27 at 11:20 +0200, Mikkel Kamstrup Erlandsen wrote:

> Attached a new version as a late update to this thread, but better
> than nothing I hope :-) I still haven't gotten around to sticking it
> in libegg (or even a bug). Sorry! I'll do that when I am more happy
> with what I have.

"glocal_string" is really "glocal_free", or at least that's what
I called it in my version, because you can use it on anything
that you know can be freed with g_free(), which isn't just
strings.  For example, private structures.

>  - Added glocal_defer(callback, arg): Calls @callback with @arg when
> leaving the current scope

Hmm.  What's the use case for this one?

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