I understand that it is used to deallocate unmanaged resources, however, I am confused as to when Dispose is actually called. I know it is called at the end of
Dispose is called in a few places:
It is recommended that you call it yourself when you are done with a resource, to better manage resources.
EDIT: I was mistaken. Dispose is NOT called during garbage collection. See this article.