diff options
author | tsepez <tsepez@chromium.org> | 2016-05-11 10:26:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-11 10:26:05 -0700 |
commit | f74ad998d2e8d2636fb25e94823946a3b151e34e (patch) | |
tree | 0b18e0a29fdc4bf1cce66ea437d8a4841b3daf4a /core | |
parent | 2c3a16a7698ba15476173e849f82c97ea3da9939 (diff) | |
download | pdfium-f74ad998d2e8d2636fb25e94823946a3b151e34e.tar.xz |
Replace some calls to Release() with direct delete, part 1.
Searching for the anti-pattern:
void Release() { delete this; }
We must be explicit on the ownership model.
Add unique_ptrs as a result.
Review-Url: https://codereview.chromium.org/1960673003
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcodec/codec/fx_codec_flate.cpp | 1 | ||||
-rw-r--r-- | core/fxcodec/codec/fx_codec_jpeg.cpp | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp index d1b4a5f985..c23de277fb 100644 --- a/core/fxcodec/codec/fx_codec_flate.cpp +++ b/core/fxcodec/codec/fx_codec_flate.cpp @@ -750,7 +750,6 @@ class CCodec_FlateScanlineDecoder : public CCodec_ScanlineDecoder { int Colors, int BitsPerComponent, int Columns); - void Destroy() { delete this; } // CCodec_ScanlineDecoder FX_BOOL v_Rewind() override; diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index ebe6106945..c41dde943f 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -318,7 +318,6 @@ class CCodec_JpegDecoder : public CCodec_ScanlineDecoder { int height, int nComps, FX_BOOL ColorTransform); - void Destroy() { delete this; } // CCodec_ScanlineDecoder FX_BOOL v_Rewind() override; |