Converting a bitmap to a region - memory leak fix

There is a memory leak in the code, posted under the article : "Converting a bitmap to a region".

At the end of the BitmapToRegion function, the lines:

	// Clean up				
	SelectObject(hDC, holdBmp);
	DeleteDC(hDC);

must be changed into :

	// Clean u
	GlobalFree(hData);
	SelectObject(hDC, holdBmp);
	DeleteDC(hDC);

Download source - 178KB



Comments

  • Fake Oakley Deception sale online

    Posted by cwiucqnvj on 06/27/2013 10:35am

    Best Oakley Sunglasses ,Oakley sunglasses polarized Asia fitting huge umbrellas, will help you in the sunshine, they look great, they are durable. Oakley half jacket XLJ sunglasses today is a symbol of excellence if you are unable to compromise performance. The planning combines technology with more than 600 patents. Replica Oakley Sunglasses ,In popular culture, Oakley is often a unique a spectacle. This is in the early 1980s, to give you enable you to possess a history of the resurrection from the original tool. Best option when it comes to wearing, whenever you want, the the Oakley tone increased with a recent series, an unbelievable aesthetic design fashion ranks. Fake Oakley Jawbone ,Premium quality and unique Oakley sunglasses as much as one hundred percent UV filter lens. It's possible to expect Oakley sunglasses, popular soon. Cheap Oakley sunglasses designer chic sunglasses in the summer, which has turn into a necessary fashion accessory, this makes all the world's great fashion. Can come up a number of colors and shapes, to ensure that women are incredibly beautiful, from the fashion as well as the hottest sunglasses, new sunglasses released a new women's styles trendy. Oakley sunglasses selling worldwide, are widespread in popular sunglasses, Oakley sunglasses, fashion, sport and health, to maintain the strong sunlight, and clear of the eyes. The trend is changing rapidly, classic maintenance is just not good! Therefore, designers are constantly updated sunglasses to indicate the new model, instead of behind it can be natural to get eyes wide open. Oakley Frogskins sunglasses sunglasses good reputation for the most well-known style. It is a new trend now online buy discount Oakley sunglasses. When people industry by storm severe challenges, you can not tolerate any performance slip, I want Oakley glasses will be their ideal choice. Oakley technology, including high-definition optics and Plutonite lenses filtrate 100% of ultraviolet, UVA, UVB and harmful blue light to 100nm and optimization from the corner. Anyone who would like to put a fashion statement will choose Oakley brand, whenever a woman got a new number of Oakley sunglasses, Ms. Jane is actually an investment. Businesses use a lots of solutions with regard to variety of Oakley sunglasses for buyers to select, should you ever needed to next season of any age and stylish Oakley sun's shadow is extremely worth consideration.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • With the average hard drive now averaging one terabyte in size, the fallout from the explosion of user-created data has become an overwhelming volume of potential evidence that law-enforcement and corporate investigators spend countless hours examining. Join Us and SANS' Rob Lee for our 45-minute webinar, A Triage and Collection Strategy for Time-Sensitive Investigations, will demonstrate how to: Identify the folders and files that often contain key insights Reduce the time spent sifting through content by …

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

Most Popular Programming Stories

More for Developers

RSS Feeds