File indexing completed on 2025-01-18 09:28:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP
0012 #define BOOST_ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019
0020 #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
0021 #if !defined(BOOST_ASIO_WINDOWS_APP)
0022
0023 #include <boost/asio/detail/noncopyable.hpp>
0024 #include <boost/asio/detail/socket_types.hpp>
0025
0026 #include <boost/asio/detail/push_options.hpp>
0027
0028 namespace boost {
0029 namespace asio {
0030 namespace detail {
0031
0032 class local_free_on_block_exit
0033 : private noncopyable
0034 {
0035 public:
0036
0037 explicit local_free_on_block_exit(void* p)
0038 : p_(p)
0039 {
0040 }
0041
0042
0043 ~local_free_on_block_exit()
0044 {
0045 ::LocalFree(p_);
0046 }
0047
0048 private:
0049 void* p_;
0050 };
0051
0052 }
0053 }
0054 }
0055
0056 #include <boost/asio/detail/pop_options.hpp>
0057
0058 #endif
0059 #endif
0060
0061 #endif