.net - How to clear a memory early in c# -


after finishing use varible, can clear memory before gc it?

if there specific resources need released immediately, implement idisposable interface , call dispose() (sometimes close() on objects, such streams).

if looking prevent passwords being retained in memory beyond lifespan, securestring supports this, though not simple use.

otherwise, have no control on when garbage collector runs or does. if desperately need kind of control, need lower level language.


Comments

Popular posts from this blog

forms - Secure PHP File Upload Script -

PHP: Exploding array elements -

reflection - How to use FxCop CustomDictionary.xml from the project localization? -