Skip to content

Commit 3f23874

Browse files
authored
revert ordering change to address PR feedback (#45964)
1 parent ea4f5f2 commit 3f23874

File tree

1 file changed

+2
-1
lines changed
  • src/libraries/Microsoft.Extensions.Caching.Memory/src

1 file changed

+2
-1
lines changed

src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ public void Dispose()
136136
{
137137
_state.IsDisposed = true;
138138

139+
CacheEntryHelper.ExitScope(this, _previous);
140+
139141
// Don't commit or propagate options if the CacheEntry Value was never set.
140142
// We assume an exception occurred causing the caller to not set the Value successfully,
141143
// so don't use this entry.
@@ -149,7 +151,6 @@ public void Dispose()
149151
}
150152
}
151153

152-
CacheEntryHelper.ExitScope(this, _previous);
153154
_previous = null; // we don't want to root unnecessary objects
154155
}
155156
}

0 commit comments

Comments
 (0)