Handle leak

Handle leak

A handle leak is a type of software bug that occurs when a computer program asks for a handle to a resource but does not free the handle when it is no longer used. If this occurs frequently or repeatedly over an extended period of time, a large number of handles may be marked in-use and thus unavailable, causing performance problems or a crash.

The term is derived from memory leak.

Causes

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

An example of this might be retrieving a handle to the display device. Programmers might use this handle to check some property (e.g. querying the supported resolutions), and then simply proceed on without ever releasing the handle. If the handle was just a pointer to some data structure with no additional management, then allowing the handle to pass out of scope would not cause an issue. However, in many cases, such handles must be explicitly closed or released to avoid leaking resources associated with them; the exact requirements for what must be done with a handle varies by interface.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Leak (disambiguation) — A leak is a a hole through which substances can escape or enter. It can also refer to:*Gas leak *Fuel leak *Grid leak, an operating characteristic of vacuum tubes *Internet leak, political leak, news leak, an unwanted transmission of information… …   Wikipedia

  • Memory leak — A memory leak, in computer science (or leakage, in this context), occurs when a computer program consumes memory but is unable to release it back to the operating system. In object oriented programming, a memory leak happens when an object is… …   Wikipedia

  • Contents of the United States diplomatic cables leak (Philippines) — Content from the United States diplomatic cables leak has depicted the Philippines and related subjects extensively. The leak, which began on 28 November 2010, occurred when the website of WikiLeaks an international new media non profit… …   Wikipedia

  • Contents of the United States diplomatic cables leak (Americas) — Contents of the United States diplomatic cables leak depict subjects in the Americas extensively. The leaks, which began on 28 November 2010, occurred when the website of WikiLeaks an international new media non profit organisation that publishes …   Wikipedia

  • Process Explorer — Infobox Software caption = Process Explorer v10.21 running in Windows XP name = Process Explorer developer = Sysinternals, Microsoft latest release version = 11.21 latest release date = release date and age|2008|08|08 operating system = Windows… …   Wikipedia

  • Valve — This article is about the flow control device. For the game developer, see Valve Corporation. For the electronic component, see Vacuum tube. For other uses, see Valve (disambiguation). These water valves are operated by handles. A valve is a… …   Wikipedia

  • List of Deadliest Catch episodes — This is a list of Deadliest Catch episodes with original airdate on Discovery Channel. Airdates on Discovery Channel Canada generally differ. Contents 1 Pilot 2 Season 1 3 Season 2 4 Season 3 …   Wikipedia

  • Crysis 2 — Official cover art for Crysis 2 Developer(s) Crytek Frankfurt Crytek UK (multiplayer)[1] …   Wikipedia

  • Business and Industry Review — ▪ 1999 Introduction Overview        Annual Average Rates of Growth of Manufacturing Output, 1980 97, Table Pattern of Output, 1994 97, Table Index Numbers of Production, Employment, and Productivity in Manufacturing Industries, Table (For Annual… …   Universalium

  • List of problems solved by MacGyver — This is a list of problems that have been solved by the fictional character MacGyver from the television series of the same name. (This list is not yet comprehensive.) MacGyver employs his resourcefulness and his knowledge of chemistry,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”