Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can cause section handle leaks?

This is a follow-up question to my previous question.

As suggested in this answer to my previous question, I used ProcessExplorer to analyze a list of handles that my application is using to find a handle leak.

The handles that are leaking are of type Section.

What exactly is a section handle, where is it used and what can cause section handles to leak?

I'm not using memory mapped files in my code.

like image 904
jpfollenius Avatar asked Oct 21 '11 07:10

jpfollenius


People also ask

What can cause a handle leak?

One cause of a handle leak is when a programmer mistakenly believes that retrieving a handle to an entity is simply obtaining an unmanaged reference, without understanding that a count, a copy, or other operation is actually being performed.

How do you troubleshoot a leaky handle?

To troubleshoot an out-of-memory condition, use the Debug Diagnostics tool to monitor memory allocations over time. The Debug Diagnostics tool can create and analyze a memory leak dump file (. dmp). When you troubleshoot memory leaks, the goal is to attach Leaktrack.

What is a handle leak Windows 10?

A handle leak is a program bug that occurs when a computer program, such as Outlook, requests a connection to a resource on the computer, but does not release the connection when it has completed its task. These are not infections and cannot be fixed by Webroot.


1 Answers

Quoting Mark Russinovich's Inside Windows 2000 (what is now called Windows Internals),

The section object, which the Win32 subsystem calls a file mapping object, represents a block of memory that two or more processes can share.

So, it's a memory mapped file. They'd leak if you created a memory mapped file and failed to close it. Pretty hard to be much more specific.

like image 87
David Heffernan Avatar answered Oct 28 '22 20:10

David Heffernan