News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

handle question

Started by Jango, March 12, 2012, 11:49:57 AM

Previous topic - Next topic

Jango

I have seen in lots of tutorial about closing the handle after making use of it and before closing the application.  Why it is necessary to close the handle?

hutch--

It will tend to depend on what the handle is. Memory handles are usually de-allocated, in many cases window handles are automatically de-allocated. Tell us what you have in mind and we can probably help you to find the reference material.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php


Tedd

Because it's good manners. :P
No snowflake in an avalanche feels responsible.

vanjast

If I remember correctly... a handle is actually a reference to a memory location, the use and size of this 'object' depends on its context.

Not closing the handle means you're not releasing memory and this will eventually cause a memory overrun/leak/crash.
:8)