PowerShell – Dispose()

You may be asking yourself “Why is that one script keeping all my RAMs?!”.

Maybe you should call the .Dispose() method on the variable to clean-up.

Another option is to use Remove-Variable .

References:
http://technet.microsoft.com/en-us/library/ff730962.aspx
http://msdn.microsoft.com/en-us/library/system.management.automation.powershell.dispose(v=vs.85).aspx

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s