Google.Cloud.Spanner.Data - Enum DisposeBehavior (4.5.0)

public enum DisposeBehavior

Reference documentation and code samples for the Google.Cloud.Spanner.Data enum DisposeBehavior.

Defines the behavior of SpannerTransaction when Dispose is called.

Namespace

Google.Cloud.Spanner.Data

Assembly

Google.Cloud.Spanner.Data.dll

Fields

NameDescription
CloseResources

Automatically closes resources when Dispose(bool) is called.

Detach

Detaches from the transaction and leaves resources still allocated. You must set DisposeBehavior to CloseResources on at least one instance to ensure there are no resource leaks when doing parallel reads.

ReleaseToPool

Releases transactional resources back to the global pool when Dispose(bool) is called. This option is not valid for shared transactions (see GetReaderPartitionsAsync(long?, long?, CancellationToken)).