[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Jul 15 02:44:51 CEST 2003


CVS commit by staikos: 

-very- close to perfect ref counting (and thus working purging) now.  the only
remaining problem is that the data manager doesn't display the ref count for
vectors quite correctly.


  M +2 -5      kstdoc.cpp   1.37


--- kdeextragear-2/kst/kst/kstdoc.cpp  #1.36:1.37
@@ -573,11 +573,8 @@ void KstDoc::purge() {
   for (KstRVectorList::Iterator it = rvl.begin(); it != rvl.end(); ++it) {
     kdDebug() << "VECTOR: " << (*it)->tagName() << " USAGE: " << (*it)->getUsage() << endl;
-    // Ref count == iterator + data manager + vectorList + rvl == 4
-    if ((*it)->getUsage() <= 4) {
-#if 0
+    if ((*it)->getUsage() == 1) {
       kdDebug() << "    -> REMOVED" << endl;
-      KST::vectorList.remove(KstVectorPtr(*it));
+      KST::vectorList.remove((*it).data());
       modified = true;
-#endif
     }
   }




More information about the Kst mailing list