From 9fd15efa4ab3302f3f9d7c7473a5377af314021c Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Mon, 8 Apr 2013 21:01:11 +0200 Subject: Reactivated independent reference counting in the SPObject tree. (bzr r11608.1.88) --- src/knotholder.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/knotholder.cpp') diff --git a/src/knotholder.cpp b/src/knotholder.cpp index 62119698f..32ba9075b 100644 --- a/src/knotholder.cpp +++ b/src/knotholder.cpp @@ -63,13 +63,16 @@ KnotHolder::KnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderReleasedFun g_print ("Error! Throw an exception, please!\n"); } - g_object_ref(G_OBJECT(item)); // TODO: is this still needed after C++-ification? + //g_object_ref(G_OBJECT(item)); // TODO: is this still needed after C++-ification? + sp_object_ref(item); sizeUpdatedConn = ControlManager::getManager().connectCtrlSizeChanged(sigc::mem_fun(*this, &KnotHolder::updateControlSizes)); } KnotHolder::~KnotHolder() { - g_object_unref(G_OBJECT(item)); + //g_object_unref(G_OBJECT(item)); + sp_object_unref(item); + for (std::list::iterator i = entity.begin(); i != entity.end(); ++i) { delete (*i); -- cgit v1.2.3