dbertoni    00/07/12 12:26:27

  Modified:    c/src/PlatformSupport ReusableArenaAllocator.hpp
  Log:
  Added return result to DestroyObject().
  
  Revision  Changes    Path
  1.7       +10 -1     
xml-xalan/c/src/PlatformSupport/ReusableArenaAllocator.hpp
  
  Index: ReusableArenaAllocator.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/PlatformSupport/ReusableArenaAllocator.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ReusableArenaAllocator.hpp        2000/07/11 21:03:31     1.6
  +++ ReusableArenaAllocator.hpp        2000/07/12 19:26:26     1.7
  @@ -114,16 +114,21 @@
         * Destroy the object, and free the block for re-use.
         *
         * @param theObject the address of the object.
  +      * @return true if the object was deleted, false if not.
         */
  -     void
  +     bool
        destroyObject(ObjectType*       theObject)
        {
                assert(m_blocks.size() != 0);
   
  +             bool    fSucess = false;
  +
                // Check this, just in case...
                if (m_lastBlockReferenced != 0 && 
m_lastBlockReferenced->ownsObject(theObject) == true)
                {
                        m_lastBlockReferenced->destroyObject(theObject);
  +
  +                     fSucess = true;
                }
                else
                {
  @@ -140,6 +145,8 @@
   
                                        
m_lastBlockReferenced->destroyObject(theObject);
   
  +                                     fSucess = true;
  +
                                        break;
                                }
                                else
  @@ -148,6 +155,8 @@
                                }
                        }
                }
  +
  +             return fSucess;
        }
   
        /*
  
  
  

Reply via email to