diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index 28d59d4..762ef18 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -11,6 +11,10 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic [Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/19?closed=1) +### Bugfixes + +* [#403](https://github.com/Icinga/icinga-powershell-framework/pull/403) Fixes memory leak on newly EventLog reader for CLI event stream + ## 1.7.1 (2021-11-11) [Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/22?closed=1) diff --git a/lib/core/framework/Read-IcingaWindowsEventLog.psm1 b/lib/core/framework/Read-IcingaWindowsEventLog.psm1 index 8ff1578..2adbcfe 100644 --- a/lib/core/framework/Read-IcingaWindowsEventLog.psm1 +++ b/lib/core/framework/Read-IcingaWindowsEventLog.psm1 @@ -66,5 +66,7 @@ function Read-IcingaWindowsEventLog() } Start-Sleep -Seconds 1; + # Force PowerShell to call the garbage collector to free memory + [System.GC]::Collect(); } }