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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["The latest version of the `Google.Cloud.Spanner.Data` library is 5.0.0-beta05, with multiple previous versions available, down to version 3.5.0, and this page is referencing version 3.9.0."],["`DisposeBehavior` is an enum within the `Google.Cloud.Spanner.Data` namespace, defining how `SpannerTransaction` behaves when its `Dispose` method is invoked."],["The `DisposeBehavior` enum has three possible values: `CloseResources`, which closes resources upon disposal; `Detach`, which leaves resources allocated; and `ReleaseToPool`, which returns resources to a global pool."],["`Detach` requires `DisposeBehavior` to be set to `CloseResources` in at least one instance to ensure no resource leaks when doing parallel reads."],["The option `ReleaseToPool` cannot be used with shared transactions."]]],[]]