public GtkObject *
new(void) {
- GtkObject *ret;
- ret = GTK_OBJECT (GET_NEW);
- return ret;
+ GtkObject *ret = GET_NEW;
+ return GTK_OBJECT (ret);
}
.fi
.PP
+You should not a subtle peculiarity of the GTK+ object system here. If there is any
+code inside the GTK_OBJECT macro argument, it will get executed multiple times. This
+means that things such as GTK_OBJECT(GET_NEW) would actually create 4 objects, leaking
+3 of them. A good rule is to be careful with all macros.
+.PP
Self alias casts:
.PP
There are some standard casts defined for you. Instead of using the full