Re: Exceptions in glib
- From: Havoc Pennington <hp redhat com>
- To: Andreas Bogk <andreas andreas org>
- Cc: gtk-devel-list gtk org
- Subject: Re: Exceptions in glib
- Date: 07 Feb 2001 12:33:48 -0500
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]