Displaying 2 results from an estimated 2 matches for "customdelet".
Did you mean:
customdeleter
2018 Sep 16
2
LLVMContext: Threads and Ownership.
...uleAndSharedContextDeleter(C));
(or invert this and traffic in structs that have a unique_ptr<Module> and a
shared_ptr<LLVMContext> as members - though the above example has the
advantage that it mostly looks like unique_ptr, and you can change
ownership (pass the unique_ptr<Module, CustomDeleter> to a shared_ptr and
it'll correctly propagate the deleter, etc))
...
But it sounds like you're concerned with a situation in which there are a
wide variety of things making Modules that are maybe outside the purview of
Orc but need this ownership model? That would seem unfortunate &a...
2018 Sep 16
2
LLVMContext: Threads and Ownership.
Agreed, the existing ownership seems sub-optimal. I wouldn't say broken,
but subtle at least - looks like you get the choice to either manage the
ownership of the Module object yourself, or let the context handle it (eg:
currently it'd be valid to just do "{ LLVMContext C; new Module(C); new
Module(C); }" - Modules end up owned by the context and cleaned up there).
Might be hard