summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_textlayout.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-04 06:13:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-04 06:13:45 -0700
commit2a14bde1011a5d374d1109fd83f59a8ff67c162e (patch)
treee11df29fe4c82e4b502884f5bec8618dfec0491d /xfa/fxfa/app/xfa_textlayout.cpp
parent4c133f3bce38415597a011f79385ec130c8adbe8 (diff)
downloadpdfium-2a14bde1011a5d374d1109fd83f59a8ff67c162e.tar.xz
Replace IFX_MemoryAllocator::Release() with delete.
All Release() did was invoke delete. Add some "overrides" while we're at it. Review-Url: https://codereview.chromium.org/1951573002
Diffstat (limited to 'xfa/fxfa/app/xfa_textlayout.cpp')
-rw-r--r--xfa/fxfa/app/xfa_textlayout.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index bd06421870..01b16a93a2 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -37,8 +37,7 @@ CXFA_TextParser::~CXFA_TextParser() {
m_pUASheet->Release();
if (m_pSelector)
m_pSelector->Release();
- if (m_pAllocator)
- m_pAllocator->Release();
+ delete m_pAllocator;
FX_POSITION ps = m_mapXMLNodeToParseContext.GetStartPosition();
while (ps) {
CFDE_XMLNode* pXMLNode;
@@ -59,10 +58,8 @@ void CXFA_TextParser::Reset() {
FXTARGET_DeleteWith(CXFA_TextParseContext, m_pAllocator, pParseContext);
}
m_mapXMLNodeToParseContext.RemoveAll();
- if (m_pAllocator) {
- m_pAllocator->Release();
- m_pAllocator = NULL;
- }
+ delete m_pAllocator;
+ m_pAllocator = nullptr;
}
void CXFA_TextParser::InitCSSData(CXFA_TextProvider* pTextProvider) {
if (pTextProvider == NULL) {
@@ -665,10 +662,8 @@ void CXFA_TextLayout::Unload() {
m_pBreak->Release();
m_pBreak = NULL;
}
- if (m_pAllocator) {
- m_pAllocator->Release();
- m_pAllocator = NULL;
- }
+ delete m_pAllocator;
+ m_pAllocator = nullptr;
}
const CXFA_PieceLineArray* CXFA_TextLayout::GetPieceLines() {
return &m_pieceLines;