MemoryStream.Dispose(Boolean) 메서드
정의
MemoryStream 클래스에 사용되는 관리되지 않는 리소스를 해제하고, 필요에 따라 관리되는 리소스를 해제합니다.Releases the unmanaged resources used by the MemoryStream class and optionally releases the managed resources.
protected:
override void Dispose(bool disposing);
protected override void Dispose (bool disposing);
override this.Dispose : bool -> unit
Protected Overrides Sub Dispose (disposing As Boolean)
매개 변수
- disposing
- Boolean
관리되는 리소스와 관리되지 않는 리소스를 모두 해제하려면 true
로 설정하고, 관리되지 않는 리소스만 해제하려면 false
로 설정합니다.true
to release both managed and unmanaged resources; false
to release only unmanaged resources.
설명
이 메서드는 공용 Dispose 메서드 및 Finalize 메서드.This method is called by the public Dispose method and the Finalize method. Dispose 보호 된 호출 Dispose 메서드를 disposing
매개 변수 설정 true
합니다.Dispose invokes the protected Dispose method with the disposing
parameter set to true
. Finalize 호출 Dispose 사용 하 여 disposing
로 false
합니다.Finalize invokes Dispose with disposing
set to false
.
disposing
매개 변수가 true
인 경우 이 메서드는 이 MemoryStream에서 참조하는 관리 개체가 보유하고 있는 리소스를 모두 해제합니다.When the disposing
parameter is true
, this method releases all resources held by any managed objects that this MemoryStream references. 이 메서드는 참조되는 각 개체의 Dispose 메서드를 호출합니다.This method invokes the Dispose method of each referenced object.
상속자 참고
Dispose()는 다른 개체에서 여러 번 호출할 수 있습니다. Dispose() can be called multiple times by other objects. 재정의 하는 경우 Dispose(Boolean) 대 한 이전 호출에서 삭제 된 개체를 참조 하지 않도록 주의 해야 Dispose()합니다.When overriding Dispose(Boolean) be careful not to reference objects that have been previously disposed of in an earlier call to Dispose(). 구현 하는 방법에 대 한 자세한 내용은 Dispose(Boolean)를 참조 하세요 [Dispose 메서드 구현](/dotnet/standard/garbage-collection/implementing-dispose)합니다.For more information about how to implement Dispose(Boolean), see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose).에 대 한 자세한 내용은 Dispose() 하 고 Finalize()를 참조 하세요 관리 되지 않는 리소스 정리합니다.For more information about Dispose() and Finalize(), see Cleaning Up Unmanaged Resources.