I was reading a book says Captive Dependencies is a issue when keeping dependencies referenced beyond their expected lifetime, for example, you inject a transient service (A) into a scoped service (B)'s constructor as its dependency, because B holds a reference of A, which delays the dispose of A.
I can understand this kind of issue. Let's consider another scenario, both A and B are disposable (implements IDisposable interface) and you inject a scoped service (B) into a transient service (A), which doesn't cause Captive Dependencies technically. But when A is first to be disposed by GC(calls Finalizer which calls Dispose in turn), its Dispose method gets call, which in turn calls B's Dispose method (because A has to call its dependencies' Dispose method when itself is being disposed as a design rule), so B's native resource will be freed, but here is the catch, what if B is also injected into another service C that depends on B, then C will not function properly since its dependency B has alread been freed.
So why all the books I see only mentions Captive Dependencies, all books says you can't inject a dependency that has a shorter life but no book says you can't inject a dependency that has a longer life when those types are disposable? Is my understanding wrong that the issue I mention will not actually happen? I am confused