Method Dispose NamespaceMongoDB.Bson.IO AssemblyMongoDB.Bson.dll Dispose(bool) Releases the unmanaged resources used by the Stream and optionally releases the managed resources. protected override void Dispose(bool disposing) Parameters disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.