Releases resources (other than memory) associated with the current instance, closing internal managed objects if requested.
If the dispose parameter is true, the current method frees all the resources associated with it as well as with all objects associated with it. If dispose is false, the current method frees only the resources allocated to it, and ignores any objects associated with it.