@@ -2292,9 +2292,6 @@ void SystemDomain::PreallocateSpecialObjects()
2292
2292
_ASSERTE (g_pPreallocatedSentinelObject == NULL );
2293
2293
2294
2294
OBJECTREF pPreallocatedSentinalObject = AllocateObject (g_pObjectClass);
2295
- #if CHECK_APP_DOMAIN_LEAKS
2296
- pPreallocatedSentinalObject->SetSyncBlockAppDomainAgile ();
2297
- #endif
2298
2295
g_pPreallocatedSentinelObject = CreatePinningHandle ( pPreallocatedSentinalObject );
2299
2296
2300
2297
#ifdef FEATURE_PREJIT
@@ -2346,19 +2343,13 @@ void SystemDomain::CreatePreallocatedExceptions()
2346
2343
2347
2344
2348
2345
EXCEPTIONREF pRudeAbortException = (EXCEPTIONREF)AllocateObject (g_pThreadAbortExceptionClass);
2349
- #if CHECK_APP_DOMAIN_LEAKS
2350
- pRudeAbortException->SetSyncBlockAppDomainAgile ();
2351
- #endif
2352
2346
pRudeAbortException->SetHResult (COR_E_THREADABORTED);
2353
2347
pRudeAbortException->SetXCode (EXCEPTION_COMPLUS);
2354
2348
_ASSERTE (g_pPreallocatedRudeThreadAbortException == NULL );
2355
2349
g_pPreallocatedRudeThreadAbortException = CreateHandle (pRudeAbortException);
2356
2350
2357
2351
2358
2352
EXCEPTIONREF pAbortException = (EXCEPTIONREF)AllocateObject (g_pThreadAbortExceptionClass);
2359
- #if CHECK_APP_DOMAIN_LEAKS
2360
- pAbortException->SetSyncBlockAppDomainAgile ();
2361
- #endif
2362
2353
pAbortException->SetHResult (COR_E_THREADABORTED);
2363
2354
pAbortException->SetXCode (EXCEPTION_COMPLUS);
2364
2355
_ASSERTE (g_pPreallocatedThreadAbortException == NULL );
@@ -8200,12 +8191,6 @@ void AppDomain::Close()
8200
8191
LOG ((LF_APPDOMAIN | LF_CORDB, LL_INFO10, " AppDomain::Domain [%d] %#08x %ls is collected.\n " ,
8201
8192
GetId ().m_dwId , this , GetFriendlyNameForLogging ()));
8202
8193
8203
-
8204
- #if CHECK_APP_DOMAIN_LEAKS
8205
- if (g_pConfig->AppDomainLeaks ())
8206
- // at this point shouldn't have any non-agile objects in the heap because we finalized all the non-agile ones.
8207
- SyncBlockCache::GetSyncBlockCache ()->CheckForUnloadedInstances (GetIndex ());
8208
- #endif // CHECK_APP_DOMAIN_LEAKS
8209
8194
{
8210
8195
GCX_PREEMP ();
8211
8196
RemoveMemoryPressure ();
0 commit comments