Remove unused CBC_QRCodeWriter::ReleaseAll().

Also remove the Destroy() methods it calls. All the things being
destroyed are also cleaned up in Finalize().

Change-Id: I3d287f54d4f3c3677598895d392ba8e6ced2c9d8
Reviewed-on: https://pdfium-review.googlesource.com/c/46470
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/fxbarcode/qrcode/BC_QRCodeWriter.cpp
index 8e4a573..f631b66 100644
--- a/fxbarcode/qrcode/BC_QRCodeWriter.cpp
+++ b/fxbarcode/qrcode/BC_QRCodeWriter.cpp
@@ -35,17 +35,7 @@
   m_iCorrectLevel = 1;
 }
 
-CBC_QRCodeWriter::~CBC_QRCodeWriter() {}
-
-void CBC_QRCodeWriter::ReleaseAll() {
-  delete CBC_ReedSolomonGF256::QRCodeField;
-  CBC_ReedSolomonGF256::QRCodeField = nullptr;
-  delete CBC_ReedSolomonGF256::DataMatrixField;
-  CBC_ReedSolomonGF256::DataMatrixField = nullptr;
-  CBC_QRCoderMode::Destroy();
-  CBC_QRCoderErrorCorrectionLevel::Destroy();
-  CBC_QRCoderVersion::Destroy();
-}
+CBC_QRCodeWriter::~CBC_QRCodeWriter() = default;
 
 bool CBC_QRCodeWriter::SetErrorCorrectionLevel(int32_t level) {
   if (level < 0 || level > 3) {
diff --git a/fxbarcode/qrcode/BC_QRCodeWriter.h b/fxbarcode/qrcode/BC_QRCodeWriter.h
index 192b465..0252a79 100644
--- a/fxbarcode/qrcode/BC_QRCodeWriter.h
+++ b/fxbarcode/qrcode/BC_QRCodeWriter.h
@@ -9,14 +9,11 @@
 
 #include "fxbarcode/BC_TwoDimWriter.h"
 
-class CBC_TwoDimWriter;
 class CBC_QRCodeWriter final : public CBC_TwoDimWriter {
  public:
   CBC_QRCodeWriter();
   ~CBC_QRCodeWriter() override;
 
-  static void ReleaseAll();
-
   uint8_t* Encode(const WideString& contents,
                   int32_t ecLevel,
                   int32_t& outWidth,
diff --git a/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp b/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp
index 23bd1de..52ceebb 100644
--- a/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.cpp
@@ -48,22 +48,3 @@
   delete Q;
   delete H;
 }
-
-void CBC_QRCoderErrorCorrectionLevel::Destroy() {
-  if (L) {
-    delete CBC_QRCoderErrorCorrectionLevel::L;
-    L = nullptr;
-  }
-  if (M) {
-    delete CBC_QRCoderErrorCorrectionLevel::M;
-    M = nullptr;
-  }
-  if (H) {
-    delete CBC_QRCoderErrorCorrectionLevel::H;
-    H = nullptr;
-  }
-  if (Q) {
-    delete CBC_QRCoderErrorCorrectionLevel::Q;
-    Q = nullptr;
-  }
-}
diff --git a/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h b/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h
index 55a2957..a981a27 100644
--- a/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h
+++ b/fxbarcode/qrcode/BC_QRCoderErrorCorrectionLevel.h
@@ -18,7 +18,6 @@
 
   static void Initialize();
   static void Finalize();
-  static void Destroy();
 
   ~CBC_QRCoderErrorCorrectionLevel();
 
diff --git a/fxbarcode/qrcode/BC_QRCoderMode.cpp b/fxbarcode/qrcode/BC_QRCoderMode.cpp
index 06ee8e1..61df381 100644
--- a/fxbarcode/qrcode/BC_QRCoderMode.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderMode.cpp
@@ -97,46 +97,3 @@
   ASSERT(result != 0);
   return result;
 }
-
-void CBC_QRCoderMode::Destroy() {
-  if (sBYTE) {
-    delete CBC_QRCoderMode::sBYTE;
-    sBYTE = nullptr;
-  }
-  if (sNUMERIC) {
-    delete CBC_QRCoderMode::sNUMERIC;
-    sNUMERIC = nullptr;
-  }
-  if (sALPHANUMERIC) {
-    delete CBC_QRCoderMode::sALPHANUMERIC;
-    sALPHANUMERIC = nullptr;
-  }
-  if (sKANJI) {
-    delete CBC_QRCoderMode::sKANJI;
-    sKANJI = nullptr;
-  }
-  if (sECI) {
-    delete CBC_QRCoderMode::sECI;
-    sECI = nullptr;
-  }
-  if (sGBK) {
-    delete CBC_QRCoderMode::sGBK;
-    sGBK = nullptr;
-  }
-  if (sTERMINATOR) {
-    delete CBC_QRCoderMode::sTERMINATOR;
-    sTERMINATOR = nullptr;
-  }
-  if (sFNC1_FIRST_POSITION) {
-    delete CBC_QRCoderMode::sFNC1_FIRST_POSITION;
-    sFNC1_FIRST_POSITION = nullptr;
-  }
-  if (sFNC1_SECOND_POSITION) {
-    delete CBC_QRCoderMode::sFNC1_SECOND_POSITION;
-    sFNC1_SECOND_POSITION = nullptr;
-  }
-  if (sSTRUCTURED_APPEND) {
-    delete CBC_QRCoderMode::sSTRUCTURED_APPEND;
-    sSTRUCTURED_APPEND = nullptr;
-  }
-}
diff --git a/fxbarcode/qrcode/BC_QRCoderMode.h b/fxbarcode/qrcode/BC_QRCoderMode.h
index 632d685..10d8f37 100644
--- a/fxbarcode/qrcode/BC_QRCoderMode.h
+++ b/fxbarcode/qrcode/BC_QRCoderMode.h
@@ -19,7 +19,6 @@
 
   static void Initialize();
   static void Finalize();
-  static void Destroy();
 
   int32_t GetCharacterCountBits(int32_t number) const;
   int32_t GetBits() const;
diff --git a/fxbarcode/qrcode/BC_QRCoderVersion.cpp b/fxbarcode/qrcode/BC_QRCoderVersion.cpp
index 20c41bf..e2efa45 100644
--- a/fxbarcode/qrcode/BC_QRCoderVersion.cpp
+++ b/fxbarcode/qrcode/BC_QRCoderVersion.cpp
@@ -75,11 +75,6 @@
   return (*g_VERSION)[versionNumber - 1].get();
 }
 
-// static
-void CBC_QRCoderVersion::Destroy() {
-  g_VERSION->clear();
-}
-
 int32_t CBC_QRCoderVersion::GetVersionNumber() const {
   return m_versionNumber;
 }
diff --git a/fxbarcode/qrcode/BC_QRCoderVersion.h b/fxbarcode/qrcode/BC_QRCoderVersion.h
index 2faa66d..b94a9e7 100644
--- a/fxbarcode/qrcode/BC_QRCoderVersion.h
+++ b/fxbarcode/qrcode/BC_QRCoderVersion.h
@@ -25,7 +25,6 @@
   static void Finalize();
 
   static const CBC_QRCoderVersion* GetVersionForNumber(int32_t versionNumber);
-  static void Destroy();
 
   int32_t GetVersionNumber() const;
   int32_t GetTotalCodeWords() const;