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

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

  • Learn how cloud-based master data management (MDM) empowers your fast-paced business to get the right data to the right place in real time, so you can remain competitive and agile.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds