Re: Exceptions in glib



Andreas Bogk <andreas andreas org> writes: 
> How about a callback-based exception mechanism? Why not let the user
> decide how to respond to an out-of-memory situation? That would also
> decrease the problems of non-local exits (I would still use them in
> the handler if appropriate).

We do have a way to install custom memory handlers in GLib 1.3.x. You
can try to recover from the out-of-memory situation in those handlers.
However you can't return from the handler until you've recovered (GLib
and GTK can't handle a NULL return from g_malloc()).

Havoc




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