mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Merge pull request #403 from Icinga:fix/memory_leak_on_eventlog_reader
Fix: Memory leak on EventLog reader With Icinga for Windows v1.7.0 we introdocued a way to read EventLog entries as stream directly into the CLI. If used for a long time, the memory consumption of this active shell will increase over time, as the Garbage Collector does not kick in. This will fix the issue by forcing the GC to be called after each loop cycle.
This commit is contained in:
commit
3c9249444a
2 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -66,5 +66,7 @@ function Read-IcingaWindowsEventLog()
|
|||
}
|
||||
|
||||
Start-Sleep -Seconds 1;
|
||||
# Force PowerShell to call the garbage collector to free memory
|
||||
[System.GC]::Collect();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue