19 #ifndef MIR_MODULE_DELETER_H_ 20 #define MIR_MODULE_DELETER_H_ 38 std::shared_ptr<mir::SharedLibrary> internal_state;
48 :
std::default_delete<T>{other},
60 : library{address_in_module}
64 detail::RefCountedLibrary library;
90 template<
typename Type,
typename... Args>
91 inline auto make_module_ptr(Args&&... args)
96 Deleter(
void* address)
98 } deleter(reinterpret_cast<void*>(&make_module_ptr<Type, Args...>));
AutoUnblockThread is a helper thread class that can gracefully shutdown at destruction time...
Definition: blob.h:26
ModuleDeleter(ModuleDeleter< U > const &other)
Definition: module_deleter.h:47
Definition: module_deleter.h:43
detail::RefCountedLibrary get_library() const
Definition: module_deleter.h:53
RefCountedLibrary & operator=(RefCountedLibrary const &)
ModuleDeleter(void *address_in_module)
Definition: module_deleter.h:59
Definition: module_deleter.h:30
ModuleDeleter()
Definition: module_deleter.h:45
std::unique_ptr< T, ModuleDeleter< T > > UniqueModulePtr
Use UniqueModulePtr to ensure that your loadable libray outlives instances created within it...
Definition: module_deleter.h:83
RefCountedLibrary(void *address)