Преглед на файлове

Merge pull request #9468 from richardkchapman/join-row-leak

HPCC-16832 JOIN in roxie may leak rows if not consumed entirely

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday преди 8 години
родител
ревизия
74825be3fa
променени са 1 файла, в които са добавени 9 реда и са изтрити 1 реда
  1. 9 1
      common/thorhelper/roxiehelper.cpp

+ 9 - 1
common/thorhelper/roxiehelper.cpp

@@ -527,7 +527,10 @@ public:
     {
     {
         sorter->reset();
         sorter->reset();
     }
     }
-
+    ~SortedInputReader()
+    {
+        sorter->reset();
+    }
     virtual const void *nextRow()
     virtual const void *nextRow()
     {
     {
         if (!firstRead)
         if (!firstRead)
@@ -613,6 +616,11 @@ class CSortAlgorithm : implements CInterfaceOf<ISortAlgorithm>
 public:
 public:
     CSortAlgorithm() { elapsedCycles = 0; }
     CSortAlgorithm() { elapsedCycles = 0; }
 
 
+    virtual void beforeDispose() override
+    {
+        reset();
+    }
+
     virtual void getSortedGroup(ConstPointerArray & result)
     virtual void getSortedGroup(ConstPointerArray & result)
     {
     {
         loop
         loop