Re: the pros of gtk_debug_shutdown



on 11/8/01 11:07 PM, Michael Meeks at michael ximian com wrote:

> Here are some of the pros and cons of having a _debug_shutdown method:

Since I almost never agree with Michael publicly, I figured I should buck
the trend and say that I think such a feature for glib, pango, and gtk is a
very good idea.

> * adds no overhead for the common case

This is overstating the case. There would have to be some additional code to
keep pointers to some things that today are created and left behind in some
global hash table with no separate pointer for the thing that's created.

One con was omitted:

* debug_shutdown will likely be left in production versions of many
programs, adding overhead at quit time

But this is quite similar to the typical tradeoff for things like g_assert
and g_return_if_fail.

    -- Darin




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