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
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp
index 01a1926..27b251a 100644
--- a/xfa/fde/css/fde_cssstyleselector.cpp
+++ b/xfa/fde/css/fde_cssstyleselector.cpp
@@ -223,10 +223,8 @@
 
 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 @@
   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 db01274..af6872b 100644
--- a/xfa/fde/css/fde_cssstylesheet.cpp
+++ b/xfa/fde/css/fde_cssstylesheet.cpp
@@ -101,10 +101,8 @@
   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;
diff --git a/xfa/fee/fde_txtedtbuf.cpp b/xfa/fee/fde_txtedtbuf.cpp
index 1369d55..c9ad392 100644
--- a/xfa/fee/fde_txtedtbuf.cpp
+++ b/xfa/fee/fde_txtedtbuf.cpp
@@ -122,7 +122,7 @@
 }
 CFDE_TxtEdtBuf::~CFDE_TxtEdtBuf() {
   Clear(TRUE);
-  m_pAllocator->Release();
+  delete m_pAllocator;
   m_Chunks.RemoveAll();
 }
 FX_BOOL CFDE_TxtEdtBuf::SetChunkSize(int32_t nChunkSize) {
@@ -362,10 +362,8 @@
                                       int32_t nChunkSize) {
   ASSERT(nChunkSize);
   ASSERT(nDefChunkCount);
-  if (m_pAllocator) {
-    m_pAllocator->Release();
-    m_pAllocator = NULL;
-  }
+  delete m_pAllocator;
+  m_pAllocator = nullptr;
   m_Chunks.RemoveAll();
   m_nChunkSize = nChunkSize;
   int32_t nChunkLength =
diff --git a/xfa/fgas/crt/fgas_memory.cpp b/xfa/fgas/crt/fgas_memory.cpp
index 04c4b31..2bd1e4d 100644
--- a/xfa/fgas/crt/fgas_memory.cpp
+++ b/xfa/fgas/crt/fgas_memory.cpp
@@ -17,10 +17,9 @@
 class CFX_DefStore : public IFX_MemoryAllocator, public CFX_Target {
  public:
   CFX_DefStore() {}
-  ~CFX_DefStore() {}
-  virtual void Release() { delete this; }
-  virtual void* Alloc(size_t size) { return FX_Alloc(uint8_t, size); }
-  virtual void Free(void* pBlock) { FX_Free(pBlock); }
+  ~CFX_DefStore() override {}
+  void* Alloc(size_t size) override { return FX_Alloc(uint8_t, size); }
+  void Free(void* pBlock) override { FX_Free(pBlock); }
 };
 
 }  // namespace
@@ -44,10 +43,9 @@
 class CFX_StaticStore : public IFX_MemoryAllocator, public CFX_Target {
  public:
   CFX_StaticStore(size_t iDefChunkSize = 4096);
-  ~CFX_StaticStore();
-  virtual void Release() { delete this; }
-  virtual void* Alloc(size_t size);
-  virtual void Free(void* pBlock) {}
+  ~CFX_StaticStore() override;
+  void* Alloc(size_t size) override;
+  void Free(void* pBlock) override {}
 
  protected:
   size_t m_iAllocatedSize;
@@ -70,10 +68,9 @@
 class CFX_FixedStore : public IFX_MemoryAllocator, public CFX_Target {
  public:
   CFX_FixedStore(size_t iBlockSize, size_t iBlockNumsInChunk);
-  virtual ~CFX_FixedStore();
-  virtual void Release() { delete this; }
-  virtual void* Alloc(size_t size);
-  virtual void Free(void* pBlock);
+  ~CFX_FixedStore() override;
+  void* Alloc(size_t size) override;
+  void Free(void* pBlock) override;
 
  protected:
   FX_FIXEDSTORECHUNK* AllocChunk();
diff --git a/xfa/fgas/crt/fgas_memory.h b/xfa/fgas/crt/fgas_memory.h
index c6c8376..a83933c 100644
--- a/xfa/fgas/crt/fgas_memory.h
+++ b/xfa/fgas/crt/fgas_memory.h
@@ -18,8 +18,6 @@
 class IFX_MemoryAllocator {
  public:
   virtual ~IFX_MemoryAllocator() {}
-  virtual void Release() = 0;
-
   virtual void* Alloc(size_t size) = 0;
   virtual void Free(void* pBlock) = 0;
 
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index bd06421..01b16a9 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -37,8 +37,7 @@
     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 @@
       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 @@
     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;