[reSIProcate] hygienic tweak to DestroyUsage::destroy()

John Gregg jgregg at aylus.com
Fri Jun 13 10:43:35 CDT 2014


Since DestroyUsage::destroy() is not actually DestroyUsage's destructor, 
once it deletes member pointers, it should really NULL out the pointers. 
It wouldn't matter if it were a destructor, in which case we would be 
guaranteed that the whole DestroyUsage object would go away, but here 
there is no such guarantee. Certainly doesn't hurt to just NULL out the 
pointers.

Diffs from 1.9.6 attached, and here it is inline:

     if (mDialogSet)
     {
        delete mDialogSet;
+      mDialogSet = NULL;
     }
     else if (mDialog)
     {
        delete mDialog;
+      mDialog = NULL;
     }


-John Gregg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DestroyUsage.cxx.diff
Type: text/x-patch
Size: 388 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140613/e954ebd2/attachment.bin>


More information about the resiprocate-devel mailing list