Re: RFC: glocal - automatically freeing memory when it goes out of scope
- From: Ben Pfaff <blp cs stanford edu>
- To: Mikkel Kamstrup Erlandsen <mikkel kamstrup canonical com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: RFC: glocal - automatically freeing memory when it goes out of scope
- Date: Tue, 29 May 2012 10:23:01 -0700
Mikkel Kamstrup Erlandsen <mikkel kamstrup canonical com> writes:
> 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.
Is it possible to combine use of this GCC-specific attribute with
the concept in Doug Gwyn's "mostly-portable" alloca
implementation, so that you would end up with something that
works pretty much everywhere (but is more efficient with GCC)?
Here's one copy of the Doug Gwyn alloca that just happened to be
on the top of the results of my web search:
ftp://ftp.dante.de/tex-archive/fonts/utilities/ps2mf/alloca.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]