I'll ignore the title and concentrate on the body of the question since it seems evident from the question what the issue is.
The short answer: You don't. This will be taken care of automatically by the garbage collector when it deems it necessary. (You don't need to run the garbage collector. That happens automatically.)
The garbage collector then looks for entities that have gone out of scope, like a
in your example, and will free the space they used. It will then see that the internals of a
have also, obviously, gone out of scope (unless they are referenced elsewhere in your code), and handle them.
Having said that, when you use variables of classes that implement Dispose
it's best to call Dispose
explicitly or use using
blocks to get that done. You can also implement a finalizer which will be executed when a
gets disposed. But it seems like that's not what you were asking about.