/// <summary> /// Acquires a reference to the given object. /// </summary> static public void AcquireRef(this IRefCounted inRef, int inRefCount = 1) { if (inRefCount <= 0) { return; } inRef.ReferenceCount += inRefCount; if (inRef.ReferenceCount == inRefCount) { inRef.OnReferenced(); } }