Re: Doubts creating new Objects
- From: James Henstridge <james daa com au>
- To: Manuel Clos <llanero jazzfree com>
- cc: gnome-devel-list gnome org
- Subject: Re: Doubts creating new Objects
- Date: Thu, 30 Mar 2000 19:34:34 +0800 (WST)
On Thu, 30 Mar 2000, Manuel Clos wrote:
> Don't know ;). Perhaps poor design: it's not the way GTK Object System
> works.
> It can be harder to read. Also it's better to cast objects if it means
> easier debug AND there is no perfomance lost in production code.
>
> I only need to hear about the debug settings you told me. If there is
> only
> a bit extra typing and no perfomance loss (in production code), I would
> be
> very happy to write programs in C and casting everywhere :).
>
You can turn off GtkObject cast checking by defining GTK_NO_CHECK_CASTS
when building the application. I am not sure of the performance
difference though.
You can also disable assertions by defining G_DISABLE_CHECKS. These two
will turn off a lot of the checks, and will result in some speed up.
However, in a lot of cases if there is a bug in your code, rather than
spitting out a warning, it will just segfault, so I am not sure if it is
best to turn off these checks.
James.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]