Cleanup #57501
dbstore: please use unique_ptr instead of new/delete pairs in DBZone
% Done:
0%
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
currently copying a DBZone object would cause double delete.
also, using new/delete may cause resource leak and considered back practice
coverity CID 1512314
History
#1 Updated by Matt Benjamin over 1 year ago
new and delete are not deprecated
#2 Updated by Matt Benjamin over 1 year ago
(unique_ptr is often a good idea, but let's not become completely prescriptive)
#3 Updated by Casey Bodley over 1 year ago
currently copying a DBZone object would cause double delete
none of these sal objects should be copyable. let's explicitly disable copy on the sal base classes so we don't accidentally do this
#4 Updated by Yuval Lifshitz over 1 year ago
would still recommend using unique_ptr in this case (don't see any justification to use new/delete pair here).
#5 Updated by Yuval Lifshitz 7 months ago
- Tracker changed from Bug to Cleanup