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

  • SEARCH
  • Home
  • 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 878185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:44:00+00:00 2026-05-15T11:44:00+00:00

Is there some way to detect file handle leaks at program termination? In particular

  • 0

Is there some way to detect file handle leaks at program termination?

In particular I would like to make sure that all of my handles that get created are being freed in code.

For example, I may have a CreateFile() somewhere, and at program termination I want to detect and ensure that all of them are closed.

  • 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-15T11:44:01+00:00Added an answer on May 15, 2026 at 11:44 am

    I have used !htrace command of windbg.

    !htrace -enable
    !htrace -snapshot
    !htrace -diff
    

    Allow you to compare the handle situation of two execution point and help you the locate the point where the leaked handle have been allocated.

    It worked well for me.

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

Sidebar

Related Questions

I am attempting to detect the file type of a library of files on
I am opening a file with read access and allowing subsequent read|write|delete file share
What is the best practice (interface and implementation) for a command line tool that
I have a Subversion working copy with at least one missing file (the local
The specific problem I’m facing is with a buggy Flash application that I don’t
I want to detect when the contents of my GWT RichTextArea become 'dirty' (have
I have a UIView based control which I need to resize depending on various
I am using .htaccess RewriteRule on a website I'm working on. Here is a
I'm currently working on an application to validate and parse CSV-files. The CSV files
I'm helping a veterinary clinic measuring pressure under a dogs paw. I use Python

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.