Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch 
into lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/104471

1. Fixed memory leak in case of index truncation
2. Fixed bug in mergeUpdates() method
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/104471
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-05-02 06:16:27 +0000
+++ ChangeLog	2012-05-02 23:18:24 +0000
@@ -22,6 +22,8 @@
 Bug Fixes/Other Changes:
   * Fixed bugs #931501 and #866987 (improved error messages for fn:format-number(). Additionally, the function now throws the FODF1310 error instead of XTDE1310, as the 3.0 spec requires)
   * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest)
+  * Fixed memory leak in case of index truncation
+  * Fixed bug in mergeUpdates() method
   * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
   * Fixed bug #986075 (encountering flwor expr with no clauses; due to common subexression being formed when inlining var in if-then-else expression) 
   * Fixed bug #967864 (var substitution did not update theFreeVars property)

=== modified file 'src/store/naive/loader_fast.cpp'
--- src/store/naive/loader_fast.cpp	2012-04-24 12:39:38 +0000
+++ src/store/naive/loader_fast.cpp	2012-05-02 23:18:24 +0000
@@ -494,10 +494,13 @@
 
     // For each child, make this doc node its parent.
     InternalNode::NodeVector& children = docNode->nodes();
+
     numChildren = nodeStack.size() - firstChildPos - 1;
+
     children.resize(numChildren);
 
     numActualChildren = 0;
+
     for (i = firstChildPos + 1; i < stackSize; ++i)
     {
       currChild = nodeStack[i];

=== modified file 'src/store/naive/simple_index_value.cpp'
--- src/store/naive/simple_index_value.cpp	2012-04-24 12:39:38 +0000
+++ src/store/naive/simple_index_value.cpp	2012-05-02 23:18:24 +0000
@@ -312,6 +312,15 @@
 ********************************************************************************/
 ValueHashIndex::~ValueHashIndex()
 {
+  clear();
+}
+
+
+/*******************************************************************************
+
+********************************************************************************/
+void ValueHashIndex::clear()
+{
   IndexMap::iterator ite = theMap.begin();
   IndexMap::iterator end = theMap.end();
  
@@ -323,14 +332,7 @@
     delete (*ite).first;
     delete (*ite).second;
   }
-}
-
-
-/*******************************************************************************
-
-********************************************************************************/
-void ValueHashIndex::clear()
-{
+
   theMap.clear();
 }
 
@@ -593,14 +595,7 @@
 ********************************************************************************/
 ValueTreeIndex::~ValueTreeIndex()
 {
-  IndexMap::iterator ite = theMap.begin();
-  IndexMap::iterator end = theMap.end();
- 
-  for (; ite != end; ++ite)
-  {
-    delete (*ite).first;
-    delete (*ite).second;
-  }
+  clear();
 }
 
 
@@ -609,6 +604,15 @@
 ********************************************************************************/
 void ValueTreeIndex::clear()
 {
+  IndexMap::iterator ite = theMap.begin();
+  IndexMap::iterator end = theMap.end();
+ 
+  for (; ite != end; ++ite)
+  {
+    delete (*ite).first;
+    delete (*ite).second;
+  }
+
   theMap.clear();
 }
 

=== modified file 'src/store/naive/simple_pul.cpp'
--- src/store/naive/simple_pul.cpp	2012-04-24 12:39:38 +0000
+++ src/store/naive/simple_pul.cpp	2012-05-02 23:18:24 +0000
@@ -1187,7 +1187,7 @@
     else
     {
       theCollectionPuls[otherIte->first] = otherIte->second;
-      otherIte->second->thePul = this;
+      otherIte->second->switchPul(this);
       otherIte->second = NULL;
       ++otherIte;
     }

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to