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

  • Thanks to wide spread cloud hosting and innovations small businesses can meet and exceed the legacy systems of goliath corporations. Explore the freedom to work how you want, with a phone system that will adapt to your evolving needs and actually save you lots of expense—read Get an Enterprise Phone System without High Cost and Complexity. The article clearly illustrates: The only hardware you'll need is phone equipment for advanced voice and fax. How to join all your employees, mobile devices, …

  • For the first time in modern history, workplace demographics now span four generations. Understanding the unique social influences that have shaped the behaviors of each is instrumental in creating productive work teams. And when managed effectively, their strengths, perspectives, and experiences can bring synergy in the workplace. Download this white paper for best practices on how to better understand and effectively manage a multi-generational workforce.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date