From: Myun2 Date: Thu, 17 May 2012 16:30:31 +0000 (+0900) Subject: shared_handle.hpp バグってたわ。直したわ… X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6d0079d6ac8a6b195d2cda7e67c2b64281d5a260;p=roast%2Froast.git shared_handle.hpp バグってたわ。直したわ… --- diff --git a/roast/include/roast/io/handle_manage.hpp b/roast/include/roast/io/handle_manage.hpp index 30da327e..40b763c1 100644 --- a/roast/include/roast/io/handle_manage.hpp +++ b/roast/include/roast/io/handle_manage.hpp @@ -35,7 +35,8 @@ namespace roast protected: // Handler - _HandlerType m_handle; + //_HandlerType m_handle; + shared_handle<_Impl> m_handle; protected: // Handler Check @@ -57,11 +58,14 @@ namespace roast // Close void close(){ + /* 2012/05/18 myun2 Close by shared_handle. + if ( m_handle != _Impl::invalid_handle ) { _Impl::close(m_handle); m_handle = _Impl::invalid_handle; } + */ } //////////////////////////////////////////////////// diff --git a/roast/include/roast/io/shared_handle.hpp b/roast/include/roast/io/shared_handle.hpp index 80b64767..54582bba 100644 --- a/roast/include/roast/io/shared_handle.hpp +++ b/roast/include/roast/io/shared_handle.hpp @@ -50,6 +50,7 @@ namespace roast holder *m_pholder; public: shared_handle(const handler_type& hndl) : m_pholder(new holder(hndl)){ m_pholder->up(); } + shared_handle(const shared_handle& from) : m_pholder(from.m_pholder){ m_pholder->up(); } virtual ~shared_handle(){ m_pholder->down(); } /////////////////////////////////////////////////////