On 05/29/2012 10:21 PM, Ben Pfaff wrote:
Mikkel Kamstrup Erlandsenmikkel.kamst...@canonical.com writes:
On 05/29/2012 07:23 PM, Ben Pfaff wrote:
Mikkel Kamstrup Erlandsenmikkel.kamst...@canonical.com writes:
I have been looking at gcc's cleanup attribute[1] that allows one to
specify a
On 05/30/2012 05:17 AM, Paul Davis wrote:
On Wed, May 30, 2012 at 3:22 AM, Mikkel Kamstrup Erlandsen
mikkel.kamst...@canonical.com mailto:mikkel.kamst...@canonical.com wrote:
alloca() does not provide a callback when cleaning up, and we need that
for anything that needs a
Mikkel Kamstrup Erlandsen mikkel.kamst...@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
Mikkel Kamstrup Erlandsen mikkel.kamst...@canonical.com writes:
On 05/29/2012 07:23 PM, Ben Pfaff wrote:
Mikkel Kamstrup Erlandsenmikkel.kamst...@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
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.
On 05/29/2012 05:36 PM, Colin Walters wrote:
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
On 05/29/2012 07:23 PM, Ben Pfaff wrote:
Mikkel Kamstrup Erlandsenmikkel.kamst...@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
On 10 April 2012 11:28, Mikkel Kamstrup Erlandsen
mikkel.kamst...@canonical.com wrote:
On 04/04/2012 05:35 AM, Colin Walters wrote:
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
On 04/04/2012 05:35 AM, Colin Walters wrote:
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
- Original Message -
On Tue, 03 Apr 2012 23:35:46 -0400
Colin Walters walt...@verbum.org wrote:
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
gcc's constructor and destructor attributes as I understand them are
principally used in connection with the loading and unloading of
shared libraries at program start-up and close down, although I
imagine they have other uses. If you say those may require OS
support I
will believe you
On Thu, 05 Apr 2012 10:58:24 -0400 (EDT)
Alexander Larsson al...@redhat.com wrote:
[snip]
I might have been a bit sloppy with my words, but the following C++
code, in a shared library:
MyClass my_object;
Needs to have the MyClass constructor for the static object my_object
run before the
On Thu, 2012-04-05 at 17:47 +0100, Chris Vine wrote:
On Thu, 05 Apr 2012 10:58:24 -0400 (EDT)
Alexander Larsson al...@redhat.com wrote:
[snip]
I might have been a bit sloppy with my words, but the following C++
code, in a shared library:
MyClass my_object;
Needs to have the
On Tue, 03 Apr 2012 23:35:46 -0400
Colin Walters walt...@verbum.org wrote:
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
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
On 11/21/2011 04:54 PM, Hub Figuière wrote:
On 21/11/11 07:34 AM, Mikkel Kamstrup Erlandsen wrote:
This is precisely my motivation for introducing this; ie. not to catch
leaks, but to tidy the code. Bigger code bases almost always grow
functions with multiple returns - notably when error
On 11/21/2011 04:51 PM, Ross Burton wrote:
On 21 November 2011 15:43, Dominic Lachowiczdomlachow...@gmail.com wrote:
If you want this sort of behavior, use a language like C++ that
supports stack-allocated objects natively. GtkMM and GlibMM already do
this wonderfully. Using a GNU-C ism which
On Tue, 2011-11-22 at 09:03 +0100, Mikkel Kamstrup Erlandsen wrote:
On 11/21/2011 04:54 PM, Hub Figuière wrote:
On 21/11/11 07:34 AM, Mikkel Kamstrup Erlandsen wrote:
This is precisely my motivation for introducing this; ie. not to catch
leaks, but to tidy the code. Bigger code bases almost
hi;
On 22 November 2011 09:44, Tristan Van Berkom trista...@openismus.com wrote:
Similarly the GMainLoop, by virtue of being a loop,
should also push a pool onto the autorelease pool stack
and pop it while dispatching GSources (and this is where
you get the extra 'unref on mainloop hit'
On Tue, Nov 22, 2011 at 4:48 AM, Emmanuele Bassi eba...@gmail.com wrote:
hi;
On 22 November 2011 09:44, Tristan Van Berkom trista...@openismus.com wrote:
Similarly the GMainLoop, by virtue of being a loop,
should also push a pool onto the autorelease pool stack
and pop it while dispatching
On 22/11/11 01:48 AM, Emmanuele Bassi wrote:
the obvious issue is: how does this interact with languages that do
have a GC, and how does the API work to avoid making the life of
developers for high-level languages apps and/or bindings a nightmare.
if libraries start using this object for their
On 11/22/2011 10:24 PM, Hub Figuière wrote:
On 22/11/11 01:48 AM, Emmanuele Bassi wrote:
the obvious issue is: how does this interact with languages that do
have a GC, and how does the API work to avoid making the life of
developers for high-level languages apps and/or bindings a nightmare.
if
On 16/11/11 12:05 PM, Mikkel Kamstrup Erlandsen wrote:
So; what say you? If there is interest I'll gladly polish it up for
inclusion. There are also tonnes of other low hanging fruits like
freeing other ref counted types, closing of streams, etc.
How about a g_autorelease_pool() or something
Le lundi 21 novembre 2011 à 00:00 -0800, Hub Figuière a écrit :
On 16/11/11 12:05 PM, Mikkel Kamstrup Erlandsen wrote:
So; what say you? If there is interest I'll gladly polish it up for
inclusion. There are also tonnes of other low hanging fruits like
freeing other ref counted types,
if (1)
{
glocal_object GFile *file = g_file_new_for_path (/tmp);
glocal_string gchar *basename = g_file_get_basename (file);
g_debug (Basename is '%s', basename);
// look ma' no leaks!
}
This is, of course, cute but I don't think this would actually catch many
On 11/21/2011 03:45 PM, Morten Welinder wrote:
if (1)
{
glocal_object GFile *file = g_file_new_for_path (/tmp);
glocal_string gchar *basename = g_file_get_basename (file);
g_debug (Basename is '%s', basename);
// look ma' no leaks!
}
This is, of course, cute
If you want this sort of behavior, use a language like C++ that
supports stack-allocated objects natively. GtkMM and GlibMM already do
this wonderfully. Using a GNU-C ism which probably won't work with
most other C compilers (MSVC, LLVM, ICC, ...) feels wrong to me.
On Mon, Nov 21, 2011 at 10:34
On 21 November 2011 15:43, Dominic Lachowicz domlachow...@gmail.com wrote:
If you want this sort of behavior, use a language like C++ that
supports stack-allocated objects natively. GtkMM and GlibMM already do
this wonderfully. Using a GNU-C ism which probably won't work with
most other C
On 21/11/11 07:34 AM, Mikkel Kamstrup Erlandsen wrote:
This is precisely my motivation for introducing this; ie. not to catch
leaks, but to tidy the code. Bigger code bases almost always grow
functions with multiple returns - notably when error handling is
introduced. Automatic freeing can cut
On 21/11/11 07:51 AM, Ross Burton wrote:
We need a micro-C++ binding that looks exactly like traditional
GObject C but also hooks up the nice features like stack allocated
objects. I don't like C++ but I'd consider a C++ compiler to compile
my C code if it could simplify memory management
On Mon, 2011-11-21 at 00:00 -0800, Hub Figuière wrote:
On 16/11/11 12:05 PM, Mikkel Kamstrup Erlandsen wrote:
So; what say you? If there is interest I'll gladly polish it up for
inclusion. There are also tonnes of other low hanging fruits like
freeing other ref counted types, closing of
31 matches
Mail list logo