ReaderWriterLockSlim.Dispose Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Releases all resources used by the current instance of the ReaderWriterLockSlim class.
Assembly: System.Core (in System.Core.dll)
Call Dispose when you are finished using the ReaderWriterLockSlim. The Dispose method leaves the ReaderWriterLockSlim in an unusable state. After calling Dispose, you must release all references to the ReaderWriterLockSlim so the garbage collector can reclaim the memory that the ReaderWriterLockSlim was occupying. For more information, see [a17b0066-71c2-4ba4-9822-8e19332fc213] and [eb4e1af0-3b48-4fbc-ad4e-fc2f64138bf9].
Note: |
|---|
Always call Dispose before you release your last reference to the ReaderWriterLockSlim. Otherwise, the resources it is using will not be freed until the garbage collector calls the ReaderWriterLockSlim object's Finalize method. |
Note: