How many Windows handles in use is “too many”?

前端 未结 5 1105
再見小時候
再見小時候 2021-02-03 10:49

I understand that the answer to this question may depend on registry settings and on the version of Windows, and perhaps on the amount of RAM if there is not enough memory. For

5条回答
  •  旧时难觅i
    2021-02-03 11:27

    See Raymond Chen's post on this topic. The window manager enforces a limit of 10K per process, and has a total limit of 32K across the system. So if it "only" leaks 100 handles per hour, then you have a few days of uptime before it starts misbehaving.

    Note that not all handles are equal. Window handles are not DB handles, for example, and may follow different rules. So this restriction might not apply, depending on what sort of handles the program is leaking. Also read this blog post.

提交回复
热议问题