Re: [GObject] Error in unref
- From: Tim Müller <zen18864 zen co uk>
- To: gtk-app-devel-list gnome org
- Cc: Uzytkownik <uzytkownik2 poczta onet pl>
- Subject: Re: [GObject] Error in unref
- Date: Mon, 25 Jul 2005 15:21:24 +0100
On Monday 25 July 2005 10:14, Uzytkownik wrote:
#define TEST(name, cau) g_print(#name "...\t%s\n", cau ? "OK" : "Fail")
TEST(Init, parser = g_object_new(WOC_PAGER_PARSER_TYPE, NULL));
g_print("%p\n", parser->scanner);
g_object_unref(parser);
...
It's print address, but after it's error of memory.
...
What do I do wrong? finalize isn't calling
You've shot yourself in the foot with that macro. Here's a hint - try this:
g_print ("%s\n", parser->scanner);
and then think about why that prints "OK" and what exactly your macro expands
to ... :-P
Cheers
-Tim
PS: it should work as expected if you put brackets around the cau in the macro
definition
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]