什么可以导致部分手柄泄漏? [英] What can cause section handle leaks?

查看:169
本文介绍了什么可以导致部分手柄泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我以前的问题的后续问题。

这个答案我以前的问题,我使用 ProcessExplorer 来分析我的应用程序用来查找句柄泄漏的句柄列表。

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.

泄漏的手柄类型为部分

什么是截面句柄,它在哪里使用,什么可以导致部分句柄泄漏?

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

我没有在我的代码中使用内存映射文件。

推荐答案

引用Mark Russinovich的Windows 2000 (现在称为Windows内部),

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


部分对象,Win32子系统称为 >文件映射对象,表示两个或多个进程可以共享的内存块。

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.

这篇关于什么可以导致部分手柄泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆