Jump to content
  • Advertisement
Sign in to follow this  
jtmerchant

Cleanup After End Process From Task Manager

This topic is 5062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my application I have a cleanup function that releases all memory, called after the message/game loop. When a user goes to Windows Task Manager and clicks end process on my application, I don't want the memory to be leaked. When the user does end my process in that way, will my code after the message loop be called? I would assume that the task manager just sends a destroy or quit message to my application, but I'm not sure.

Share this post


Link to post
Share on other sites
Advertisement
I am not sure at all but could it be possible that Ending the process kills all its sub processes and destroys any memory the process is using...?

Share this post


Link to post
Share on other sites
Hi,

Quote:
Original post by jtmerchant
In my application I have a cleanup function that releases all memory, called after the message/game loop. When a user goes to Windows Task Manager and clicks end process on my application, I don't want the memory to be leaked. When the user does end my process in that way, will my code after the message loop be called? I would assume that the task manager just sends a destroy or quit message to my application, but I'm not sure.


No, it really ends the process - ie it cleans everything which refers to the process in memory, meaning that you don't have to care about allocated memory, open file descriptors or handles, etc. It does this automagically.

Remember that killing a process is typically done when the process do not respond. If it does not respond, there is no reason to send it a message.

Regards,

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!