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 736039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:33:33+00:00 2026-05-14T07:33:33+00:00

From this answer: When is a C++ terminate handler the Right Thing(TM)? It would

  • 0

From this answer: When is a C++ terminate handler the Right Thing(TM)?

It would be nice to have a list of resources that ‘are’ and ‘are not’ automatically cleaned up by the OS when an application quits. In your answer it would be nice if you can specify the OS/resource and preferably a link to some documentaiton (if appropriate).

The obvious one:

Memory: Yes automatically cleaned up.
Question. Are there any exceptions?

  • 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-14T07:33:33+00:00Added an answer on May 14, 2026 at 7:33 am

    There are some obscure resources that Windows does not clean up when an app crashes or exits without explicitly releasing them, mostly because the OS doesn’t know if they’re important to leave around or not.

    1. Temporary files — as others have mentioned.
    2. Globally registered WNDCLASSes (“No window classes registered by a DLL are unregistered when the DLL is unloaded. A DLL must explicitly unregister its classes when it is unloaded.” MSDN) If your global window class also has a class DC, then that DC will leak as well.
    3. Global ATOMs (a relatively limited resource).
    4. Window message IDs created with RegisterWindowMessage. These are designed to leak, since there’s no UnregisterWindowMessage.
    5. Semaphores and Events aren’t technically leaked, but when the owning application goes away without signalling them, then other processes can hang. This is not true for a Mutex. If the owning application goes away, other processes waiting on that Mutex are released.
    6. There may be some residual weirdness on Windows XP and earlier if you don’t unregister a hot key before exiting. Other applications may be unable to register the same hot key.
    7. On Windows XP and earlier, it’s not uncommon to have a zombie console window live on after a process crashes. (Specifically, a GUI application that also creates a console window.) It shows up on the task bar. All you can do is minimize, restore, or move the window.
    8. Buggy drivers can be aggravated by apps that don’t explicitly release resources when they exit. Non-paged pool leaks are fairly common.
    9. Data copied to the clipboard. I guess that doesn’t really count because it’s owned by the OS at that point, not the application that put it there.
    10. Globally installed hooks aren’t unloaded when the installing process crashes before removing the hook.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking at the answer to this question: Pulling details from response
I have come across this before, and the answer has been either to null-terminate
I have not been able to find an answer for this on Google. I
I'm having trouble figuring out how to implement the code from this answer. Android:
I am using the accepted answer from this question . The relevant code is
From this question & the answers - What is the correct answer for cout
This question arose from the discussion in the comments of this answer . First,
I just read this great answer from BalusC about how to upload files with
I am trying to integrated linkedIn using this question answer Posting LinkedIn message from
I've just read this snippet from another answer : When you create a block

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.