Explorar o código

HPCC-21389 Avoid some calls to ReleaseRoxieRow

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday %!s(int64=6) %!d(string=hai) anos
pai
achega
a43e294b94
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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. */