There seems to be a leak in my install of PS v4.
CLRVersion 4.0.30319.34209
BuildVersion 6.3.9600.17400
I run the following, memory quickly grows unbounded:
while($true) {
New-Object System.Object
}
If I break out of the loop and call [System.GC]::Collect()
excess memory is immediately freed. The weird part is that I can run this in a slightly older PSv4 version I have lying around (CLR build 34014, buildversion build 15394), and it runs fine.
Is there a setting in PS that toggles garbage collection?