Re: Why these "critical" errors ?
- From: Krzysztof Kosiński <tweenk pl gmail com>
- To: Glus Xof <gtglus gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Why these "critical" errors ?
- Date: Tue, 19 Jan 2010 20:13:42 +0100
2010/1/19 Glus Xof <gtglus gmail com>:
> But, honestly, I didn't understand why cannot do it... In any case, I
> get it after the Gtk::Main() call.
It's still a problem if the static instance is created before Gtk::Main runs.
> How should I work-around it ?
You can use Meyer's singleton. The static instance will be initialized
the first time it is accessed.
Gtk::Foo &get_static_gtk_foo() {
static Gtk::Foo foo(1, 2, 3);
return foo;
}
Regards, Krzysztof Kosiński
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]