Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 539523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:08:41+00:00 2026-05-13T10:08:41+00:00

What are the best ways for a .NET developer to hunt down (and avoid)

  • 0

What are the best ways for a .NET developer to hunt down (and avoid) unmanaged leaks in a managed app?

There seem to be many excellent resources for tracking down managed leaks, but I haven’t found much on tracking unmanaged leaks in a managed app.

This question is related, but asks the question from a purely unmanaged point of view, so many of the answers assume that you have access to unmanaged code, and none mention any .NET-specific pitfalls or techniques.

Here are some (very basic) things I have tried:

  • DebugDiag. It looks very promising, and it may work for you, but it happens to crash my particular app.
  • Rational PurifyPlus. Sadly, also crashes my app.
  • AQTime (at the recommendation of @Reed and @Caelum). This program looks fabulous, but, like the poster of the question @Caelum mentioned, AQTime also crashes my app.
  • Temporarily remove code that creates objects that I know use unmanaged memory.
  • Ensure that the app is disposing all objects that implement IDisposable

I should mention that I was able to successfully profile another managed app (which was leaking unmanaged memory) using the profilers above. Please give them a try if you’ve got an unmanaged leak.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:08:41+00:00Added an answer on May 13, 2026 at 10:08 am

    I think you have hit the majority of options, the best way I have found is simply to think about the how I am using and dispoising of unmanaged resources right from the start.

    As you said, ensuring good use of IDisposable and thinking about finalizers and how they impact your application are the best ways I have found to avoid leaks in the first place :).

    DebugDiag is what the Microsoft performance team will use when looking for problems with your application, and I believe taking memory dumps for it may even be integrated into task manager in Win 7 and Visual Studio 2010 as well.

    When using DebugDiag be sure to look at the SOS extensions. Perhaps a better question would be to ask why DebugDiag and PurifyPlus are crashing for your particular app? As this seems like it will cause problems regardless of what you try…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 319k
  • Answers 319k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You need to adjust the picture box location based on… May 14, 2026 at 12:04 am
  • Editorial Team
    Editorial Team added an answer Have you tried this jQuery plugin? http://plugins.jquery.com/project/elementcenter It will keep… May 14, 2026 at 12:04 am
  • Editorial Team
    Editorial Team added an answer Best practice is to import every module that defines identifiers… May 14, 2026 at 12:04 am

Related Questions

I recently switched over to a MacBook Pro so I'm still really new at
I need to process large image files into smaller image files. I would like
I am wanting to develop a web application, what is the current state of
I'm frustrated recently by all of the choices that Microsoft offers to develop a
I work in the technical group at a large Architecture firm. While there are

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.