Skip to content

Commit 6fa979f

Browse files
committed
micro opt
1 parent 02101f8 commit 6fa979f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/PoolBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Reflection;
44
using System.Text;
55
using System.Linq;
6+
using System.Runtime.CompilerServices;
67

78
namespace LightObjectPool
89
{
@@ -90,6 +91,9 @@ public void Dispose()
9091
/// <summary>
9192
/// Throws a <see cref="ObjectDisposedException"/> if the <see cref="Dispose()"/> method has been called.
9293
/// </summary>
94+
#if !NET40
95+
[MethodImpl(MethodImplOptions.AggressiveInlining)]
96+
#endif
9397
protected void CheckDisposed()
9498
{
9599
if (_isDisposed) throw new ObjectDisposedException(this.GetType().FullName);

0 commit comments

Comments
 (0)