Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4993 Discussions

Kernel resource leak

Peter_S_8
Beginner
749 Views

Hello there

when I close my application the inspector throws me a kernel resource leak message pointing to the main window handle.

The summary screen shows two times the CreateWindow line.

The application has been cosed correctly with a DestroyWindow.

How can I get rid of that message??

kind regards

 Peter

0 Kudos
4 Replies
SergeyKostrov
Valued Contributor II
749 Views
>>The summary screen shows two times the CreateWindow line. >> >>The application has been cosed correctly with a DestroyWindow. >> >>How can I get rid of that message?? Could you post a screenshot with Inspector XE error? Also, I assume that you're dealing with a problem in GUI Win32 application. In that case, you need to review all calls to GDI Win32 API functions. Take into account, that even if the window for the application was successfully destroyed that window could have a menu resource allocated dynamically in the application. However, this is only a possible case and it is Not proven since your description is too generic. In overall, All GDI resources allocated dynamically need to be released before application exits.
0 Kudos
Peter_W_Intel
Employee
749 Views

>>How can I get rid of that message??

Before doing memory error analysis, in "Configure Analysis Type" windows, uncheck "Detect resource leaks" option. That will be fine.

If GDI resource used in your program was not grown quickly, it is not the critical issue; If it happened in 3rd-party library, you have no idea to deal with; If your program runs shortly, when your process exits, MS will release all occupied resource. They are all I assumed:-)

In general speaking, as Sergey commented that you need to find why via call stack info

0 Kudos
Peter_S_8
Beginner
749 Views

Thanks for your help

I have found embedded fonts as the cause of the message - they were not released on program exit.

kind regards

 Peter

0 Kudos
Bernard
Valued Contributor I
749 Views

As Sergey pointed it out you should have been checked recursively all handles to window and also other GUI elements which have parent-child  relationship with the top container which is window.

0 Kudos
Reply