Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Visual Studio 2022

You're reading from   Mastering Visual Studio 2022 Develop apps like a pro with advanced Visual Studio techniques using C# and .NET

Arrow left icon
Product type Paperback
Published in Dec 2024
Publisher Packt
ISBN-13 9781835884683
Length 324 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Romain Ottonelli  Dabadie Romain Ottonelli Dabadie
Author Profile Icon Romain Ottonelli Dabadie
Romain Ottonelli Dabadie
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Part 1: Mastering Core Development Skills
2. Chapter 1: Unit Testing and Test-Driven Development FREE CHAPTER 3. Chapter 2: Advanced Debugging Strategies 4. Chapter 3: Advanced Code Analysis and Refactoring 5. Chapter 4: Performance Optimization and Profiling 6. Part 2: Advancing Development Horizons
7. Chapter 5: Multi-Platform App UI Development 8. Chapter 6: Advanced Web Development Tools 9. Chapter 7: Machine Learning Integration 10. Chapter 8: Advanced Cloud Integration and Services 11. Part 3: Streamlining Collaborative Development with DevOps Practices
12. Chapter 9: Handling Advanced Git Workflows 13. Chapter 10: Continuous Integration with GitHub Actions 14. Chapter 11: Collaborative Development with Azure DevOps 15. Chapter 12: Visual Studio Container Tools for Docker 16. Part 4: Mastering Core Development Skills
17. Chapter 13: Writing Your Own Project Template 18. Chapter 14: Writing Your Own Visual Studio Extensions 19. Chapter 15: Creating and Publishing Powerful NuGet Packages for the Community 20. Index 21. Other Books You May Enjoy

Memory profiling and optimization

Just as a reminder, a memory leak occurs when a computer program mishandles memory allocations, leading to unreleased memory that is no longer needed. .NET applications are generally less vulnerable to memory leaks due to automatic garbage collection and the fact that .NET applications are written in managed code. This means that the runtime has control over memory allocation and deallocation. However, if we produce code with smells or misuse the disposable pattern, memory leaks can still occur.

In this section, we will explore how we can leverage Visual Studio to resolve memory leaks using the Memory Usage profiling tools and then the diagnostic tools available while debugging.

Using the Memory Usage tools

To find and resolve a memory leak, we can use the Memory Usage tool in Visual Studio. It is a robust profiling feature designed to monitor and analyze our application’s memory usage effectively. It supports various application types...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image