[ACCEPTED]-Powershell does not release the memory-memory-management
Accepted answer
Try
[GC]::Collect()
That enforces garbage collection
0
It seems that there is a memory leak in 3 Get-Content.
[GC]::Collect didn't work in 2 our case when loading ~6000 documents and 1 we had to use a StreamReader instead:
$sr = New-Object System.IO.StreamReader($filepath)
...
$sr.Dispose()
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.