From 9f5bb1647867d0aec02ec76a210e69225d270c8c Mon Sep 17 00:00:00 2001
From: Gareth Reakes <gareth@apache.org>
Date: Mon, 20 Oct 2003 12:12:44 +0000
Subject: [PATCH] removed use of new without memory manager.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175296 13f79535-47bb-0310-9956-ffa450edef68
---
 src/xercesc/dom/impl/DOMConfigurationImpl.cpp | 12 ++++++------
 src/xercesc/dom/impl/DOMConfigurationImpl.hpp |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/xercesc/dom/impl/DOMConfigurationImpl.cpp b/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
index 43f7f2675..a89995cf5 100644
--- a/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
+++ b/src/xercesc/dom/impl/DOMConfigurationImpl.cpp
@@ -63,6 +63,9 @@
 
 XERCES_CPP_NAMESPACE_BEGIN
 
+const bool DOMConfigurationImpl::fFalse = false;
+const bool DOMConfigurationImpl::fTrue = true;
+
 /* canonical-form */
 const XMLCh DOMConfigurationImpl::fgCANONICAL_FORM[] = { chLatin_c, chLatin_a, chLatin_n, chLatin_o, chLatin_n, chLatin_i, chLatin_c, chLatin_a, chLatin_l, chDash, chLatin_f, chLatin_o, chLatin_r, chLatin_m, chNull };
 
@@ -116,14 +119,11 @@ const XMLCh DOMConfigurationImpl::fgSCHEMA_LOCATION[] = { chLatin_s, chLatin_c,
 
 const unsigned short DOMConfigurationImpl::fDEFAULT_VALUES = 0x2596;
 
-DOMConfigurationImpl::DOMConfigurationImpl(): featureValues(fDEFAULT_VALUES), fTrue(new bool(true)), 
-                                              fFalse(new bool(false)),
+DOMConfigurationImpl::DOMConfigurationImpl(): featureValues(fDEFAULT_VALUES),
                                               fErrorHandler(0), fSchemaType(0), fSchemaLocation(0) {
 }
 
 DOMConfigurationImpl::~DOMConfigurationImpl() {
-    delete (bool*)fTrue;
-    delete (bool*)fFalse;
 }
                                         
 void DOMConfigurationImpl::setParameter(const XMLCh* name, const void* value) {
@@ -183,9 +183,9 @@ const void* DOMConfigurationImpl::getParameter(const XMLCh* name) const {
 
     if(isBooleanParameter){
         if(featureValues & whichFlag) {
-            return fTrue;
+            return &fTrue;
         } else {
-            return fFalse;
+            return &fFalse;
         }
     } else {
         if(XMLString::equals(lowerCaseName, fgERROR_HANDLER)) {
diff --git a/src/xercesc/dom/impl/DOMConfigurationImpl.hpp b/src/xercesc/dom/impl/DOMConfigurationImpl.hpp
index adf876107..282c1f3fe 100644
--- a/src/xercesc/dom/impl/DOMConfigurationImpl.hpp
+++ b/src/xercesc/dom/impl/DOMConfigurationImpl.hpp
@@ -194,8 +194,8 @@ private:
     // the schema location
     const XMLCh* fSchemaLocation;
 
-    const bool* fFalse;
-    const bool* fTrue;
+    static const bool fFalse;
+    static const bool fTrue;
 };
 
 XERCES_CPP_NAMESPACE_END
-- 
GitLab