diff --git a/thorlcr/activities/indexwrite/thindexwriteslave.cpp b/thorlcr/activities/indexwrite/thindexwriteslave.cpp index dedde83ade3..5502804098d 100644 --- a/thorlcr/activities/indexwrite/thindexwriteslave.cpp +++ b/thorlcr/activities/indexwrite/thindexwriteslave.cpp @@ -40,7 +40,7 @@ class IndexWriteSlaveActivity : public ProcessSlaveActivity, public ILookAheadSt StringAttr logicalFilename; Owned partDesc, tlkDesc; IHThorIndexWriteArg *helper; - Owned builder; + Owned builder; Owned myInputStream; Owned metadata; Linked outRowAllocator; @@ -237,7 +237,7 @@ class IndexWriteSlaveActivity : public ProcessSlaveActivity, public ILookAheadSt { // Clear out builder before merging builder stats into inactive stats // so that gatherActiveStatistics doesn't also merge builder stats. - Owned tmpBuilder; + Owned tmpBuilder; { CriticalBlock b(builderCS); tmpBuilder.setown(builder.getClear()); @@ -253,7 +253,6 @@ class IndexWriteSlaveActivity : public ProcessSlaveActivity, public ILookAheadSt leafMemorySize = tmpBuilder->getLeafMemorySize(); } mergeStats(inactiveStats, tmpBuilder, indexWriteActivityStatistics); - tmpBuilder.clear(); } } }