danperor / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 1 forks source link

memory leak in ToManagedImage #249

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Pass an image with an invalid pixel format or other problem to ToManagedImage
2.
3.

What is the expected output? What do you see instead?
throw exception, which it does, but the created image isn't disposed resulting 
in a memory leak. Need to wrap the method in a try/catch/dispose/throw block

What version of the product are you using?
2.2.0.0

Please provide any additional information below.

Original issue reported on code.google.com by sean.p.t...@gmail.com on 30 Aug 2011 at 3:26

GoogleCodeExporter commented 8 years ago
Adding try/catch block into UnmanagedImage.ToManagedImage(), so it handles 
possible exceptions and disposes managed image if it was already created.

Committed in revision 1582. Will be released in version 2.2.2.

Original comment by andrew.k...@gmail.com on 30 Aug 2011 at 5:06

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 18 Sep 2011 at 7:57