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"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eDisposeBehavior\u003c/code\u003e enum within the \u003ccode\u003eGoogle.Cloud.Spanner.Data\u003c/code\u003e namespace, specifically in version 4.2.0 of the .NET library.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDisposeBehavior\u003c/code\u003e enum defines how \u003ccode\u003eSpannerTransaction\u003c/code\u003e objects handle resource management when the \u003ccode\u003eDispose\u003c/code\u003e method is called.\u003c/p\u003e\n"],["\u003cp\u003eThere are three \u003ccode\u003eDisposeBehavior\u003c/code\u003e fields available: \u003ccode\u003eCloseResources\u003c/code\u003e, which automatically closes resources; \u003ccode\u003eDetach\u003c/code\u003e, which detaches from the transaction but leaves resources allocated; and \u003ccode\u003eReleaseToPool\u003c/code\u003e, which returns resources to the global pool.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is 5.0.0-beta05, and there are several other version available for browsing.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDisposeBehavior\u003c/code\u003e is important to set correctly, especially when using parallel reads, to avoid resource leaks.\u003c/p\u003e\n"]]],[],null,[]]