Re: Using GLib main loop to free up temporary memory

2007-01-04 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, Jan 04, 2007 at 03:15:10PM +0100, David Nečas (Yeti) wrote: > On Thu, Jan 04, 2007 at 02:00:14PM +, [EMAIL PROTECTED] wrote: > > > > Try alloca() if you are into that sort of thing. It's frowned upon, > > because it is a BSD extension... >

Re: Using GLib main loop to free up temporary memory

2007-01-04 Thread Yeti
On Thu, Jan 04, 2007 at 02:00:14PM +, [EMAIL PROTECTED] wrote: > > Try alloca() if you are into that sort of thing. It's frowned upon, > because it is a BSD extension... g_newa() should work on all platforms GLib works on. Yeti -- http://physics.muni.cz/~yeti/pf2007.png ___

Re: Using GLib main loop to free up temporary memory

2007-01-04 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Jan 03, 2007 at 01:02:39PM -0200, Leandro A. F. Pereira wrote: > Greetings! [idle_free] Cute. But as Iago points out, you'll have to make sure that your app doesn't go into idle until the object is used. Tough call. I'd think it's more danger

Re: Using GLib main loop to free up temporary memory

2007-01-03 Thread Iago Rubio
On Wed, 2007-01-03 at 13:02 -0200, Leandro A. F. Pereira wrote: > Greetings! > > When you program with GTK+ (or GLib) with C, sometimes there's a need > for temporary dynamically-allocated variables. The problem is to free > them in the right time — or worse — having to use even more auxiliary > v

Using GLib main loop to free up temporary memory

2007-01-03 Thread Leandro A. F. Pereira
Greetings! When you program with GTK+ (or GLib) with C, sometimes there's a need for temporary dynamically-allocated variables. The problem is to free them in the right time — or worse — having to use even more auxiliary variables, like in the example below: gchar *func(void) { gchar *temp = g_