Skip to Content
C# 7 and .NET Core 2.0 High Performance
book

C# 7 and .NET Core 2.0 High Performance

by Ovais Mehboob Ahmed Khan
April 2018
Intermediate to advanced
300 pages
7h 41m
English
Packt Publishing
Content preview from C# 7 and .NET Core 2.0 High Performance

Avoiding finalizers

Using finalizers is not a good practice to use in .NET Core applications. Objects that use finalizers stay in memory longer and ultimately affect the application's performance.

Objects that are not required by the application at a particular point in time stay in the memory so that their Finalizer method can be called. For example, if the object is considered dead by the GC in generation 0, it will always survive in generation 1.

In .NET Core, CLR maintains a separate thread to run the Finalizer method. All the objects that contain the Finalizer method are placed into the finalization queue. Any object that is no longer required by the application is placed in the F-Reachable queue, which is then executed by the dedicated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional C# 7 and .NET Core 2.0, 7th Edition

Professional C# 7 and .NET Core 2.0, 7th Edition

Christian Nagel
Pro ASP.NET Web API: HTTP Web Services in ASP.NET

Pro ASP.NET Web API: HTTP Web Services in ASP.NET

Tugberk Ugurlu, Alexander Zeitler, Ali Kheyrollahi
Enterprise Application Development with C# 9 and .NET 5

Enterprise Application Development with C# 9 and .NET 5

Ravindra Akella, Rishabh Verma, Arun Kumar Tamirisa, Suneel Kumar Kunani, Bhupesh Guptha Muthiyalu

Publisher Resources

ISBN: 9781788470049Supplemental Content