summaryrefslogtreecommitdiff
path: root/xfa/fde
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/fde
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/fde')
-rw-r--r--xfa/fde/css/fde_cssstyleselector.cpp12
-rw-r--r--xfa/fde/css/fde_cssstylesheet.cpp6
2 files changed, 6 insertions, 12 deletions
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp
index 01a19267e1..27b251a783 100644
--- a/xfa/fde/css/fde_cssstyleselector.cpp
+++ b/xfa/fde/css/fde_cssstyleselector.cpp
@@ -223,10 +223,8 @@ CFDE_CSSStyleSelector::CFDE_CSSStyleSelector()
CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector() {
Reset();
- if (m_pInlineStyleStore)
- m_pInlineStyleStore->Release();
- if (m_pFixedStyleStore)
- m_pFixedStyleStore->Release();
+ delete m_pInlineStyleStore;
+ delete m_pFixedStyleStore;
delete m_pAccelerator;
}
@@ -302,10 +300,8 @@ void CFDE_CSSStyleSelector::Reset() {
for (int32_t iGroup = 0; iGroup < FDE_CSSSTYLESHEETGROUP_MAX; ++iGroup) {
m_RuleCollection[iGroup].Clear();
}
- if (m_pRuleDataStore != NULL) {
- m_pRuleDataStore->Release();
- m_pRuleDataStore = NULL;
- }
+ delete m_pRuleDataStore;
+ m_pRuleDataStore = nullptr;
}
int32_t CFDE_CSSStyleSelector::MatchDeclarations(
CXFA_CSSTagProvider* pTag,
diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp
index db01274d6a..af6872bbaa 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -101,10 +101,8 @@ void CFDE_CSSStyleSheet::Reset() {
m_RuleArray.RemoveAll();
m_Selectors.RemoveAll();
m_StringCache.RemoveAll();
- if (m_pAllocator) {
- m_pAllocator->Release();
- m_pAllocator = NULL;
- }
+ delete m_pAllocator;
+ m_pAllocator = nullptr;
}
uint32_t CFDE_CSSStyleSheet::AddRef() {
return ++m_wRefCount;