draco1023 / aforge

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

COM objects not freed in DirectShow player #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using?
2.1.1

Please provide any additional information below.

1. in AForge.Video.DirectShow.FileVideoSource WorkerThread, when connecting 
pins as in
graph.Connect(Tools.GetOutPin(sourceBase,0), Tools.GetInPin(grabberBase,0))
there remain references to both of the pins! Suggested change:
IPin outPin=Tools.GetOutPin(sourceBase, 0);
IPin inPin=Tools.GetInPin(grabberBase, 0);
graph.Connect(outPin, inPin);
Marshal.ReleaseComObject(outPin);
Marshal.ReleaseComObject(inPin);

2. in Tools.GetPin - the pinsEnum object is never released. Suggested 
change - wrapping while(pinsEnum.Next,...) in try/finally and 
Marshal.ReleaseComObject(pinsEnum) inside finally{}

Original issue reported on code.google.com by uja...@gmail.com on 17 Feb 2010 at 5:50

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 22 Feb 2010 at 2:34

GoogleCodeExporter commented 9 years ago
Thank you for spotting these issues. Fixed.

Committed in revision 1185. Will be released in version 2.1.2

Original comment by andrew.k...@gmail.com on 24 Feb 2010 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 10 Mar 2010 at 3:12