Code

since the view and document are both managed by the collector, reffing the document...
authormental <mental@users.sourceforge.net>
Sat, 29 Apr 2006 15:42:18 +0000 (15:42 +0000)
committermental <mental@users.sourceforge.net>
Sat, 29 Apr 2006 15:42:18 +0000 (15:42 +0000)
ChangeLog
src/ui/view/view.cpp

index d4d316430e9f79455fe5a34eb695f669c8144da4..a44b9d39ccca1db53099622b825b89c773af5508 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-04-29  MenTaLguY  <mental@rydia.net>
+
+       * src/ui/view/view.cpp:
+
+         Wait a minute -- UI::View::View and SPDocument are both managed
+         by the collector -- the view doesn't need to ref the document!
+
 2006-04-29  MenTaLguY  <mental@rydia.net>
 
        * src/ui/view/view.cpp: add missing unref
index 48c48c750ae3d07e74b7ca0e1484deb27b3ed38c..04158ddbdd74595b759149661ca0839d0026bccf 100644 (file)
@@ -97,7 +97,6 @@ void View::_close() {
     if (_doc) {
         _document_uri_set_connection.disconnect();
         _document_resized_connection.disconnect();
-        sp_document_unref(_doc);
         _doc = 0;
     }
     
@@ -139,10 +138,9 @@ void View::setDocument(SPDocument *doc) {
     if (_doc) {
         _document_uri_set_connection.disconnect();
         _document_resized_connection.disconnect();
-        sp_document_unref (_doc);
     }
 
-    _doc = sp_document_ref (doc);
+    _doc = doc;
     _document_uri_set_connection = 
         _doc->connectURISet(sigc::bind(sigc::ptr_fun(&_onDocumentURISet), this));
     _document_resized_connection =