Removed method ReleaseManagedCommandLine()
authorBrian Sullivan <briansul@microsoft.com>
Mon, 29 Apr 2019 16:43:03 +0000 (09:43 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Mon, 29 Apr 2019 16:43:03 +0000 (09:43 -0700)
jkotas - We are intentionally not doing any cleanup that is just releasing memory.
We depend on the OS to take care of releasing the memory.

Commit migrated from https://github.com/dotnet/coreclr/commit/663ce255b2d236d1b8075f635a9d5b0d20b45c7a

src/coreclr/src/vm/ceeload.cpp
src/coreclr/src/vm/ceeload.h
src/coreclr/src/vm/ceemain.cpp

index c21f186..3e1d96d 100644 (file)
@@ -11737,17 +11737,6 @@ void SaveManagedCommandLine(LPCWSTR pwzAssemblyPath, int argc, LPCWSTR *argv)
 #endif 
 }
 
-// Release any memory that we allocated for the managed command line
-void ReleaseManagedCommandLine()
-{
-    LIMITED_METHOD_CONTRACT;
-
-#ifdef FEATURE_PAL
-    delete[] s_pCommandLine; 
-    s_pCommandLine = NULL;
-#endif
-}
-
 static void ProfileDataAllocateScenarioInfo(ProfileEmitter * pEmitter, LPCSTR scopeName, GUID* pMvid)
 {
     CONTRACTL
index adfefcc..407d969 100644 (file)
@@ -3423,7 +3423,5 @@ struct VASigCookieEx : public VASigCookie
 LPCWSTR GetManagedCommandLine();
 // Save the command line for the current process.
 void SaveManagedCommandLine(LPCWSTR pwzAssemblyPath, int argc, LPCWSTR *argv);
-// Release any memory that we allocated for the managed command line
-void ReleaseManagedCommandLine();
 
 #endif // !CEELOAD_H_
index d2e23b8..e595e88 100644 (file)
@@ -1463,12 +1463,6 @@ void STDMETHODCALLTYPE EEShutDownHelper(BOOL fIsDllUnloading)
     DiagnosticServer::Shutdown();
 #endif // FEATURE_PERFTRACING
 
-    // When running under FEATURE_PAL, the SetCommandLineArgs call above will
-    // call SaveManagedCommandLine which will allocate memory using new WCHAR[]
-    // We can release this memory now.
-    //
-    ReleaseManagedCommandLine();
-
 #if defined(FEATURE_COMINTEROP)
     // Get the current thread.
     Thread * pThisThread = GetThread();