From: Brian Sullivan Date: Mon, 29 Apr 2019 16:43:03 +0000 (-0700) Subject: Removed method ReleaseManagedCommandLine() X-Git-Tag: submit/tizen/20210909.063632~11030^2~1689^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f071bde3222254d21b4aa9a503cc21612e60a240;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Removed method ReleaseManagedCommandLine() 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 --- diff --git a/src/coreclr/src/vm/ceeload.cpp b/src/coreclr/src/vm/ceeload.cpp index c21f186..3e1d96d 100644 --- a/src/coreclr/src/vm/ceeload.cpp +++ b/src/coreclr/src/vm/ceeload.cpp @@ -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 diff --git a/src/coreclr/src/vm/ceeload.h b/src/coreclr/src/vm/ceeload.h index adfefcc..407d969 100644 --- a/src/coreclr/src/vm/ceeload.h +++ b/src/coreclr/src/vm/ceeload.h @@ -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_ diff --git a/src/coreclr/src/vm/ceemain.cpp b/src/coreclr/src/vm/ceemain.cpp index d2e23b8..e595e88 100644 --- a/src/coreclr/src/vm/ceemain.cpp +++ b/src/coreclr/src/vm/ceemain.cpp @@ -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();