don't actually need to worry about refcounting here - in fact even though I was keeping count, I wasn't actually doing anything with it :)

This commit is contained in:
jez 2007-11-12 09:06:25 +00:00
parent 67ad360326
commit 8f6b783dc7

View file

@ -20,8 +20,8 @@ class DOMImplementation
public: public:
static DOM::DOMImplementation<stringT, string_adaptorT> getDOMImplementation() static DOM::DOMImplementation<stringT, string_adaptorT> getDOMImplementation()
{ {
static DOM::DOMImplementation<stringT, string_adaptorT> domImpl(new DOMImplementationImpl<stringT, string_adaptorT>()); static DOMImplementationImpl<stringT, string_adaptorT> domImpl;
return domImpl; return DOM::DOMImplementation<stringT, string_adaptorT>(&domImpl);
} // getDOMImplementation } // getDOMImplementation
private: private:
@ -32,8 +32,9 @@ template<class stringT, class string_adaptorT>
class DOMImplementationImpl : public DOM::DOMImplementation_impl<stringT, string_adaptorT> class DOMImplementationImpl : public DOM::DOMImplementation_impl<stringT, string_adaptorT>
{ {
public: public:
virtual void addRef() { ++refCount_; } // we don't actually need the ref count in this case
virtual void releaseRef() { --refCount_; } virtual void addRef() { }
virtual void releaseRef() { }
//////////////////////////////////////////////// ////////////////////////////////////////////////
// DOMImplementation methods // DOMImplementation methods
@ -74,12 +75,9 @@ class DOMImplementationImpl : public DOM::DOMImplementation_impl<stringT, string
return doc; return doc;
} // createDocument } // createDocument
public:
DOMImplementationImpl() : refCount_(0) { }
virtual ~DOMImplementationImpl() { }
private: private:
unsigned int refCount_; DOMImplementationImpl() { }
virtual ~DOMImplementationImpl() { }
DOMImplementationImpl(const DOMImplementationImpl&); DOMImplementationImpl(const DOMImplementationImpl&);
DOMImplementationImpl& operator=(const DOMImplementationImpl&); DOMImplementationImpl& operator=(const DOMImplementationImpl&);