From b1c2d4b61e95ae22bd918c44236f50002e3e48de Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 5 Apr 2016 22:11:47 +0200 Subject: Clarified object construction where 'enabled_shared_from_this' is used. Use it only where it is needed. --- doc/book/net.tex | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/book/net.tex b/doc/book/net.tex index c5581e33..1e5f1803 100644 --- a/doc/book/net.tex +++ b/doc/book/net.tex @@ -68,7 +68,7 @@ services. Before using a messaging service, you must create and initialize a session object: \begin{lstlisting} -vmime::shared_ptr theSession = vmime::make_shared (); +vmime::shared_ptr theSession = vmime::net::session::create(); \end{lstlisting} Session properties include: @@ -328,8 +328,7 @@ This is how to use it: \begin{lstlisting} // First, create a session -vmime::shared_ptr sess = - vmime::make_shared (); +vmime::shared_ptr sess = vmime::net::session::create(); // Next, initialize a service which will use our authenticator vmime::shared_ptr st = @@ -417,8 +416,7 @@ const vmime::string msgData = // Create a new session vmime::utility::url url("smtp://example.com"); -vmime::shared_ptr sess = - vmime::make_shared (); +vmime::shared_ptr sess = vmime::net::session::create(); // Create an instance of the transport service vmime::shared_ptr tr = sess->getTransport(url); @@ -471,8 +469,7 @@ store service: // Create a new session vmime::utility::url url("imap://vincent:password@imap:example.org"); -vmime::shared_ptr sess = - vmime::make_shared (); +vmime::shared_ptr sess = vmime::net::session::create(); // Create an instance of the transport service vmime::shared_ptr store = sess->getStore(url); -- cgit v1.2.3