| ~unique_resource_t() | ~unique_resource_t() | ||||
| { | { | ||||
| if( m_execute_on_destruction == true ) | |||||
| { | |||||
| try | |||||
| { | |||||
| m_deleter(m_resource); | |||||
| } | |||||
| catch( ... ) { /* Empty */ } | |||||
| } | |||||
| invoke(invoke_it::once); | |||||
| } | } | ||||
| unique_resource_t& operator=(unique_resource_t&& other) noexcept | unique_resource_t& operator=(unique_resource_t&& other) noexcept | ||||
| { | { | ||||
| m_deleter(m_resource); | |||||
| invoke(invoke_it::once); | |||||
| m_resource = std::move(other.m_resource); | m_resource = std::move(other.m_resource); | ||||
| m_deleter = std::move(other.m_deleter); | m_deleter = std::move(other.m_deleter); | ||||
| m_execute_on_destruction = other.m_execute_on_destruction; | m_execute_on_destruction = other.m_execute_on_destruction; |