Browse Source

HPCC-21389 Avoid some calls to ReleaseRoxieRow

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 6 years ago
parent
commit
a43e294b94
1 changed files with 1 additions and 1 deletions
  1. 1 1
      roxie/roxiemem/roxiemem.hpp

+ 1 - 1
roxie/roxiemem/roxiemem.hpp

@@ -299,7 +299,7 @@ public:
     inline OwnedConstRoxieRow(const void * _ptr)            { ptr = _ptr; }
     inline OwnedConstRoxieRow(const OwnedConstRoxieRow & other) { ptr = other.getLink(); }
 
-    inline ~OwnedConstRoxieRow()                            { ReleaseRoxieRow(ptr); }
+    inline ~OwnedConstRoxieRow()                            { if (ptr) ReleaseRoxieRow(ptr); }
     
 private: 
     /* these overloaded operators are the devil of memory leak. Use set, setown instead. */