Skip to content

Instantly share code, notes, and snippets.

@ProIntegritate
Created July 28, 2021 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ProIntegritate/6d854d2dd45d912ded60da680f61661f to your computer and use it in GitHub Desktop.
Save ProIntegritate/6d854d2dd45d912ded60da680f61661f to your computer and use it in GitHub Desktop.
Specific object cleanup:
Object.Dispose() ' Does not exist for all objects though.
Object = Nothing ' This _will_ exist for all objects.
The periodically run:
GC.Collect() ' Init Garbage collector
If you use performance counters (System.Diagnostic.*), you may want to clean them up too as you free things up:
PerformanceCounter.CloseSharedResources()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment