Am I susceptible to memory leaks if I inject dependencies as classes and not as instances? The reason I want to do this is that the 3rd-party library I am integrating only exposes class methods. Is it dangerous if I do just that? (and why and when would this danger show up):
var service: ServiceProtocol.Type
init(withService service: ServiceProtocol.Type = Service.self) {
self.service = service
}
and then inside the class I just call a method like this:
self.service.doSomething()