.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Debug Leaky Apps: Identify And Prevent Memory Leaks In Managed Code

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

When is the .NET Garbage Collector unable to reclaim memory? The answer might surprise you. Stay tuned.

James Kovacs

MSDN Magazine January 2007

View Complete Post

More Related Resource Links

Memory Lane: Rediscover the Lost Art of Memory Optimization in Your Managed Code


Managed applications rely on the garbage collector in the .NET Framework to allocate and clean up memory. The little CPU time spent performing garbage collection (GC) is usually a fair trade-off for not having to worry about memory management. But for applications in which CPU time and memory are precious resources, minimizing the time spent garbage collecting can greatly improve application performance and robustness. Find out how to manage memory all over again.

Erik Brown

MSDN Magazine January 2005

Debug: Detect and Plug GDI Leaks in Your Code with Two Powerful Tools for Windows XP


In a previous article, the author devised a simple method to detect Graphical Device Interface (GDI) objects that are not properly released by Win32-based applications on Windows 9x platforms. Because some newer versions of Windows require a slightly different approach to GDI leaks, the author has updated his techniques for those operating systems. He builds and explains two tools designed to detect and eradicate GDI leaks in applications running on Windows XP, Windows 2000, and Windows NT.

Christophe Nasarre

MSDN Magazine January 2003

Resource Leaks: Detecting, Locating, and Repairing Your Leaky GDI Code


Leaks are possible, even in robust Windows-based applications. As bugs go, leaks are some of the most difficult to find, especially when they occur in graphics device interface (GDI) objects and menus. While free and third-party tools exist to detect such leaks, it is usually difficult to make the connection between the numeric handle value returned by the tool, and a bitmap or menu in your program. This can limit the usefulness of these tools. Custom tools can be built that detect, track down, and eradicate GDI and menu leaks. Here, three such tools are built using well-known and documented APIs.

Christophe Nasarre

MSDN Magazine March 2001

How to detect and avoid memory and resources leaks in .NET application

Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

Managed Extensibility Framework: Building Composable Apps in .NET 4 with the Managed Extensibility F


Glenn Block explains how the Managed Extensibility Framework, a new library coming in .NET Framework 4.0, tackles the longstanding issue of building applications and components that can be reused and extended by others. Learn how to build apps that can use new functionality introduced by developers, framework authors and third-party extenders.

Glenn Block

MSDN Magazine February 2010

CLR Inside Out: Best Practices For Managed And Native Code Interoperability


There are many factors to consider when building your app with both managed and native code. Find out how to employ interop and how to choose the interop that's right for you.

Jesse Kaplan

MSDN Magazine January 2009

CLR Inside Out: Marshaling between Managed and Unmanaged Code


Marshaling is an important part of .NET interop. It allows you to call into unmanaged code from managed code. This column will help you get started.

Yi Zhang and Xiaoying Guo

MSDN Magazine January 2008

Parallel Performance: Optimize Managed Code For Multi-Core Machines


While multi-core processors have become increasingly common, most applications still fail to take advantage of multiple cores. Here's an overview of creating multithreaded applications that benefit from these new processors.

Daan Leijen and Judd Hall

MSDN Magazine October 2007

Office Apps: Extend Your VBA Code With VSTO


VSTO brings you the full feature set of Visual Studio including LINQ, WPF, WCF, and the .NET Framework 3.5.

Paul Stubbs and Kathleen McGrath

MSDN Magazine August 2007

Share Code: Write Code Once For Both Mobile And Desktop Apps


If you're building .NET client apps already, target them to Windows Mobile using the same skills and toolsets.

Daniel Moth

MSDN Magazine July 2007

Smart Storage: Protect Your Data Via Managed Code And The Windows Vista Smart Card APIs


Smart cards are a compelling alternative to the reliance on passwords, which are the weakest link in authentication systems. Get the Windows smart card programming basics here.

Dan Griffin

MSDN Magazine November 2006

C++ at Work: Managed Code in Visual Studio 2005


Many of you are no doubt in the process of upgrading to Visual Studio® 2005, so I thought now would be a good time to relate some of my own experiences with the new compiler. What took me so long? Hey, I'm a retro kind of guy! Better late than never!.

Paul DiLascia

MSDN Magazine June 2006

Memory Models: Understand the Impact of Low-Lock Techniques in Multithreaded Apps


Because the use of low-lock techniques in your application significantly increases the likelihood of introducing hard-to-find bugs, it is best to use them only when absolutely necessary. Here Vance Morrison demonstrates the limitations and subtleties low-lock techniques so that if you are forced to use them you have a better chance of using them correctly.

Vance Morrison

MSDN Magazine October 2005

Stay Alert: Use Managed Code To Generate A Secure Audit Trail


In today's security-conscious environments, a reliable audit trail is a valuable forensic tool The Windows Server 2003 operating system provides features that let you enable a wide range of applications to make use of auditing functionality. This article looks at auditing from the operating system perspective and describes a sample managed code implementation that will allow you to add auditing to your own server applications.

Mark Novak

MSDN Magazine October 2005

Security: Manipulate Privileges in Managed Code Reliably, Securely, and Efficiently


When the author was faced with implementing support for changing a security descriptor on an object, he noticed there was not support for that operation in .NET. So he devised two solutions to the problem: the first, simpler one, is tailored to the .NET Framework 1.1 and can be used today. The second solution incorporates several advanced features available only in the .NET Framework 2.0. Both are presented here.

Mark Novak

MSDN Magazine March 2005

Smart Tags: Realize the Potential of Office 2003 by Creating Smart Tags in Managed Code


While you may well be excited about the prospect of building managed smart tags, there is little information available to help you create them using .NET. In this article the author fills in the blanks. Along the way he discusses the Microsoft Office Smart Tag List XML schema, advanced managed smart tags for Office 2003 and Office XP, and deploying these features in an organization.

Ben Waldron

MSDN Magazine February 2005

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend