memory leaks - How do you free windows handle pointer in Delphi 7? -


I am using a third party tool that points to images in memory with windows handles.

Tool statistics that you are responsible for releasing the handle, how will you handle it in Delphi 7? The datatype for the handle is long

If the device tells you that you are responsible for cleaning, you It should also have been said that whom you should use. Take a closer look at the documentation.

You should be more specific about the type of handle

Use most kernel objects (mute x objects, threads, processes, files, pipes, events, etc.).

If you really have an image handle, such as HBitmap or HIcon , then it's free with you.

is issued with the window handle ( HWND ).

You may have a memory handle, as provided by GlobalAlloc ; Use for that.

It may not be a Windows handle at all, it may be a specific handle for your device's API, for which it requires API-specific work to delete it.

The bottom line is that you need to know what you have.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -