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.
[[["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 beta version is 5.0.0-beta05, while version 4.3.0 is the current focus of the documentation, with various versions ranging from 3.5.0 up to this beta version also listed."],["The `DisposeBehavior` enum, part of the `Google.Cloud.Spanner.Data` namespace, controls how `SpannerTransaction` handles resource disposal when `Dispose` is called."],["The `DisposeBehavior` enum defines three fields: `CloseResources` automatically closes resources, `Detach` leaves resources allocated, and `ReleaseToPool` returns transactional resources to the global pool."],["The `ReleaseToPool` option for `DisposeBehavior` is invalid for shared transactions, referencing the `GetReaderPartitionsAsync` method."]]],[]]