From b74e708cb5cfdef71e5d87ff473dbe8d2d507a3a Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Sat, 28 Dec 2024 03:25:21 +0000 Subject: [PATCH] Seal `ClientRemoteSessionDSHandlerImpl` (#21218) The motivation of this PR is this comment by @PaulHigin https://github.com/PowerShell/PowerShell/pull/11820#discussion_r452405592_. _Contributes to #15110._ --- .../engine/remoting/client/remotingprotocolimplementation.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/System.Management.Automation/engine/remoting/client/remotingprotocolimplementation.cs b/src/System.Management.Automation/engine/remoting/client/remotingprotocolimplementation.cs index b0312329893..eb65cd219db 100644 --- a/src/System.Management.Automation/engine/remoting/client/remotingprotocolimplementation.cs +++ b/src/System.Management.Automation/engine/remoting/client/remotingprotocolimplementation.cs @@ -741,9 +741,7 @@ internal void ProcessNonSessionMessages(RemoteDataObject rcvdData) public void Dispose() { _transportManager.Dispose(); - - GC.SuppressFinalize(this); - } + } #endregion IDisposable