Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: xfa/fxfa/app/xfa_textlayout.cpp

Issue 1951573002: Replace IFX_MemoryAllocator::Release() with delete. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fgas/crt/fgas_memory.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_textlayout.cpp
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index bd06421870b3396ddc4f1000e9f90ce537e3cb73..01b16a93a21bcd4a0bc12256c82718ccd898d915 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;
« no previous file with comments | « xfa/fgas/crt/fgas_memory.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698