Enum DisposeBehavior (3.15.1)

public 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(Boolean) 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(Boolean) is called. This option is not valid for shared transactions (see GetReaderPartitionsAsync(Nullable<Int64>, Nullable<Int64>, CancellationToken)).