You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You dont have to have a finalizer to gain benefit from GC.SuppressFinalize When you call it, the object is removed from the finalizer queue. With it not in the finalizer queue, theres no wasted performance of having the object on the queue, fetching from the queue, and the GC having to reflect and figure out there's no finalizer to run.
The generally accepted pattern is objects that implement IDisposable call this, since IDisposable objects will get thrown into the finalizer queue whereas objects without IDisposable, I believe get GC'd practically immediately.
Why do
SafeDictionary
andTinyIoCContainer
both callGC.SuppressFinalize
when neither have finalizers? 🤔From NancyFx/Nancy#2896
The text was updated successfully, but these errors were encountered: