The dotNetDave For Those About to Code: Worldwide Tour will be at the virtual Code Quality Conference 2022 on August 19th. Last year we had over 72K software engineers watch the conference and I hope you will watch it this year to learn how to rock your code to release quality applications and services that meet your user’s needs.
I’m excited to do this session for the first time. You will learn a lot no matter what level of software engineer you are!
Röck Yoür Cöde: Everything That Every .NET Developer Needs to Know About Disposable Types
Is your application or service running slow? Are they gobbling up too much memory? Do you have to reboot servers or services every once in a while, and you have no idea why? Well, I know exactly why! I have reviewed millions of lines of code from Microsoft .NET projects and hands down, the number one issue is not handing disposable types correctly.
Microsoft .NET has been around for 20 years and one thing that is very critical for every developer to know is exactly how memory management works in the runtime. If you don’t, you will cause performance issues but more serious is causing virtual memory leaks. The way that .NET was designed back in the late ’90s is that it does not have memory leaks in the true sense, but it can create virtual memory leaks.
In this session, I will show examples and metrics from a real-world in-production solution. If developers do not deal with these types when the code is first written, it will be very, very expensive and time-consuming to fix later down the road (if they even get fixed). The main topics covered in this session are properly disposing of objects, how to properly implement the IDisposable interface for types that you create, and I will finish up by showing tools that can help you find these issues so you too can be a Code Shark!
The performance of code is always something that is very important. It’s even more important if your back-end apps are processing tens of thousands of requests per second which includes microservices. In this session, I will reveal the dos and don’ts when it comes to improving code performance when writing business software. Some code I will show can be up to 98% faster! Reducing the memory that your app uses is also very important and will be discussed in detail. All demos in this session work with .NET Framework and .NET. This is part of my series titled “Improving Code Quality… One Developer at A Time”.
Video
Resources
- Hidden IDisposable Issues In Microsoft .NET
- Everything That Every.NET Developer Needs To Know About Disposable Types: Properly Disposing of Objects
- Everything That Every .NET Developer Needs To Know About Disposable Types: Properly Implementing The IDisposable Interface
- Everything That Every.NET Developer Needs To Know About Disposable Types: Using Tools To Find Issues
- My IDisposable Template
- Using Async/Await with Disposable Objects
Pick up any books by David McCarter by going to Amazon.com: http://bit.ly/RockYourCodeBooks If you learned something from this session, I hope you will show your appreciation by going here: https://buymeacoffee.com/dotnetdave Make sure to check out an upcoming episode of Rockin' the Code World where each week I interview industry leaders! https://www.c-sharpcorner.com/live/rockin-the-code-world-with-dotnetdave
Discover more from dotNetTips.com
Subscribe to get the latest posts sent to your email.

