← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/destroy-annotation-qnames into lp:zorba

 

Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/destroy-annotation-qnames into lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)
  Matthias Brantner (matthias-brantner)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/destroy-annotation-qnames/+merge/97824

Annotation QNames are now released when destroy is called (used to be in class destructor).
-- 
https://code.launchpad.net/~zorba-coders/zorba/destroy-annotation-qnames/+merge/97824
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/annotations/annotations.cpp'
--- src/annotations/annotations.cpp	2012-01-11 17:30:25 +0000
+++ src/annotations/annotations.cpp	2012-03-16 10:03:07 +0000
@@ -209,6 +209,12 @@
 void AnnotationInternal::destroyBuiltIn()
 {
   theAnnotId2NameMap.clear();
+  ItemHandleHashMap<AnnotationId>::iterator ite = theAnnotName2IdMap.begin();
+  ItemHandleHashMap<AnnotationId>::iterator end = theAnnotName2IdMap.end();
+  for (; ite != end; ++ite)
+  {
+    (*ite).first->removeReference();
+  }
   theAnnotName2IdMap.clear();
 }
 


Follow ups