From ae4fb171df25c328e398d0cf1909a4cbad33a897 Mon Sep 17 00:00:00 2001 From: buliabyak <> Date: Sat, 28 Sep 2013 13:58:09 -0300 Subject: dying document needs to delete its perspective (bzr r12611) --- src/document.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index 800f2f33d..dda072283 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -219,6 +219,11 @@ SPDocument::~SPDocument() { inkscape_unref(); keepalive = FALSE; } + + if (this->current_persp3d_impl) + delete this->current_persp3d_impl; + this->current_persp3d_impl = NULL; + //delete this->_whiteboard_session_manager; } -- cgit v1.2.3 From ee8f0667f84689466f68eecfb9498e7b092e168b Mon Sep 17 00:00:00 2001 From: buliabyak <> Date: Sat, 28 Sep 2013 23:09:39 -0300 Subject: collectOrphans moved to the end of destructor to prevent leaking of uncollected stuff (bzr r12625) --- src/document.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/document.cpp') diff --git a/src/document.cpp b/src/document.cpp index dda072283..b94b72bda 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -139,8 +139,6 @@ SPDocument::SPDocument() : } SPDocument::~SPDocument() { - collectOrphans(); - // kill/unhook this first if ( profileManager ) { delete profileManager; @@ -224,6 +222,9 @@ SPDocument::~SPDocument() { delete this->current_persp3d_impl; this->current_persp3d_impl = NULL; + // This is at the end of the destructor, because preceding code adds new orphans to the queue + collectOrphans(); + //delete this->_whiteboard_session_manager; } -- cgit v1.2.3