diff options
author | Vincent Richard <[email protected]> | 2005-07-12 22:28:02 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-07-12 22:28:02 +0000 |
commit | 681297e10b666e13cc463f6fbb16236f36c3266c (patch) | |
tree | 5d2392e2283232ed3475cd9c69e22897b03e8a97 /src/stringContentHandler.cpp | |
parent | Added contentHandler::extractRaw(). (diff) | |
download | vmime-681297e10b666e13cc463f6fbb16236f36c3266c.tar.gz vmime-681297e10b666e13cc463f6fbb16236f36c3266c.zip |
Reference counting and smart pointers.
Diffstat (limited to 'src/stringContentHandler.cpp')
-rw-r--r-- | src/stringContentHandler.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/stringContentHandler.cpp b/src/stringContentHandler.cpp index 1d4ccc5c..9c1553f4 100644 --- a/src/stringContentHandler.cpp +++ b/src/stringContentHandler.cpp @@ -54,9 +54,9 @@ stringContentHandler::~stringContentHandler() } -contentHandler* stringContentHandler::clone() const +ref <contentHandler> stringContentHandler::clone() const { - return new stringContentHandler(*this); + return vmime::create <stringContentHandler>(*this); } @@ -110,8 +110,8 @@ void stringContentHandler::generate(utility::outputStream& os, // buffer, and then re-encode to output stream... if (m_encoding != enc) { - utility::auto_ptr <encoder> theDecoder(m_encoding.getEncoder()); - utility::auto_ptr <encoder> theEncoder(enc.getEncoder()); + ref <encoder> theDecoder = m_encoding.getEncoder(); + ref <encoder> theEncoder = enc.getEncoder(); theEncoder->getProperties()["maxlinelength"] = maxLineLength; @@ -136,7 +136,7 @@ void stringContentHandler::generate(utility::outputStream& os, // Need to encode data before else { - utility::auto_ptr <encoder> theEncoder(enc.getEncoder()); + ref <encoder> theEncoder = enc.getEncoder(); theEncoder->getProperties()["maxlinelength"] = maxLineLength; utility::inputStreamStringProxyAdapter in(m_string); @@ -156,7 +156,7 @@ void stringContentHandler::extract(utility::outputStream& os) const // Need to decode data else { - utility::auto_ptr <encoder> theDecoder(m_encoding.getEncoder()); + ref <encoder> theDecoder = m_encoding.getEncoder(); utility::inputStreamStringProxyAdapter in(m_string); |