File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ internal unsafe partial class FrozenObjectHeapManager
1616 {
1717 public static readonly FrozenObjectHeapManager Instance = new FrozenObjectHeapManager ( ) ;
1818
19- private readonly LowLevelLock m_Crst = new LowLevelLock ( ) ;
19+ private readonly Lock m_Crst = new Lock ( ) ;
2020 private FrozenObjectSegment m_CurrentSegment ;
2121
2222 // Default size to reserve for a frozen segment
@@ -34,9 +34,7 @@ internal unsafe partial class FrozenObjectHeapManager
3434 {
3535 HalfBakedObject * obj = null ;
3636
37- m_Crst . Acquire ( ) ;
38-
39- try
37+ using ( m_Crst . EnterScope ( ) )
4038 {
4139 Debug . Assert ( type != null ) ;
4240 // _ASSERT(FOH_COMMIT_SIZE >= MIN_OBJECT_SIZE);
@@ -84,10 +82,6 @@ internal unsafe partial class FrozenObjectHeapManager
8482 Debug . Assert ( obj != null ) ;
8583 }
8684 } // end of m_Crst lock
87- finally
88- {
89- m_Crst . Release ( ) ;
90- }
9185
9286 IntPtr result = ( IntPtr ) obj ;
9387
You can’t perform that action at this time.
0 commit comments