Closed qwertzui11 closed 5 years ago
I guess di
cleans up when the program ends. But how may I trigger it manually. eg at the end of an unit test?
The extension di::extension::shared_config
fixed the issue. issue #383 describes my problem. I didn't expect that the default behavior is a shared instance over all injectors.
Hi! awesome library!
Problem
I got a simple dependecy tree
Everything works great. But, according to AddressSanitizer I got a memory leak at the end of the function
create
.My question
How can I clean up the dependencies. How can I destruct the instance of
A
? Do I have to refactor the parameters in the constructor ofA
tostd::shared_ptr
to address this issue?Specifications