1 //Copyright (c) Microsoft. All rights reserved.2 //Licensed under the MIT license. See LICENSE file under the project root for full LICENSE information.3 4 namespaceDotnetty.common5 {6 /// <summary>7 ///interface for reusable objects with reference counts8 /// </summary>9 Public InterfaceireferencecountedTen { One /// <summary> A ///returns the reference count for this object - /// </summary> - intReferencecount {Get; } the - /// <summary> - ///Keep reference count +1 - /// </summary> + ireferencecounted Retain (); - + /// <summary> A ///Increase reference count<see cref= "increment"/>. at /// </summary> -Ireferencecounted Retain (intincrement); - - /// <summary> - ///Touch records the current object's access location for debugging purposes. - ///If this object is determined to be compromised, the information records this operation in /// </summary> - /// <returns></returns> to ireferencecounted Touch (); + - /// <summary> the ///records the location of the object's current access for additional arbitrary information for debugging purposes. * ///if the object is identified as a leak, the information logged by this operation is passed through the resource leak detector<see cref= "Resourceleakdetector"/>available to you $ /// Panax Notoginseng /// </summary> -Ireferencecounted Touch (Objecthint); the + /// <summary> A ///reducing the reference count by 1 and releasing the reference count of the object reaches 0 o'clock. the /// </summary> + /// <returns>true: This object has been disposed when and only if the reference count is 0</returns> - BOOLRelease (); $ $ /// <summary> - ///reduces the reference count, releasing the object if the reference count is 0 o'clock<see cref= "decrement"/> - /// </summary> the /// <returns>true if and only if the reference count is 0, this object has been disposed</returns> - BOOLRelease (intdecrement);Wuyi } the}
Ireferencecounted Dotnetty.common