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

  • Live Event Date: May 6, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT While you likely have very good reasons for remaining on WinXP after end of support -- an estimated 20-30% of worldwide devices still are -- the bottom line is your security risk is now significant. In the absence of security patches, attackers will certainly turn their attention to this new opportunity. Join Lumension Vice President Paul Zimski in this one-hour webcast to discuss risk and, more importantly, 5 pragmatic risk mitigation techniques …

  • The impact of a data loss event can be significant. Real-time data is essential to remaining competitive. Many companies can no longer afford to rely on a truck arriving each day to take backup tapes offsite. For most companies, a cloud backup and recovery solution will eliminate, or significantly reduce, IT resources related to the mundane task of backup and allow your resources to be redeployed to more strategic projects. The cloud - can now be comfortable for you – with 100% recovery from anywhere all …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds