Re: closure floating
- From: Havoc Pennington <hp redhat com>
- To: Karl Nelson <kenelson ece ucdavis edu>
- Cc: Tim Janik <timj gtk org>, kenelson bull ece ucdavis edu, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: closure floating
- Date: 17 Jan 2001 21:49:10 -0500
Karl Nelson <kenelson ece ucdavis edu> writes:
> This seems unlikely, but then is it?
> It is a distinct possibility if you consider the case of
> assertions.
>
> void foobar(GtkWidget* w, GClosure* c)
> {
> /*...*/
> g_return_if_fail(w!=0);
> /*...*/
> g_signal_connect ....
> }
That doesn't make any difference, we don't guarantee any kind of sane
behavior after an assertion has bombed; usually it segfaults, so a
memory leak is a relatively mild breakdown.
If passing 0 was allowed, the function wouldn't warn about it.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]