Re: refptr and this
- From: Murray Cumming <murrayc murrayc com>
- To: Jonathon Jongsma <jonathon quotidian org>
- Cc: gtkmm list <gtkmm-list gnome org>
- Subject: Re: refptr and this
- Date: Sun, 17 Feb 2008 10:58:14 +0100
On Fri, 2008-02-15 at 23:36 -0600, Jonathon Jongsma wrote:
> child->set_parent(Glib::RefPtr<Item>(this));
> Except this seems to cause refcounting problems and the program crashes.
The RefPtr constructor does not take a reference, so you need to do
RefPtr<Item>(this, true). I think it's that simple.
Murray.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]