I have a C# application that uses Windows Media Encoder 9 to stream multiple
programs. For each new program, I create a new instance of WMEncoder. After
successfully stopping the Encoder, what is the proper way to remove it for
Garbage Collection? Currently I set Encoder = null and Garbage Collection
should remove it from what I understand.
I have not been able to get rid of the new Encoder instances and this
creates a memory leak. Please help.
Is there any good documentation out there dealing with Interop.WMEncoderLib?
I haven't found any yet or good C# code examples dealing with this matter.
Is there a function of Dispose or something similar for the Encoder? I need
to figure out the correct way to release all the resources of the Encoder.
Thanks,
Bob
Bob
Chris Dunaway - 13 Mar 2008 14:31 GMT
On Mar 12, 5:22 pm, Bsmengen <Bsmen...@discussions.microsoft.com>
wrote:
> I have a C# application that uses Windows Media Encoder 9 to stream multiple
> programs. For each new program, I create a new instance of WMEncoder. After
[quoted text clipped - 15 lines]
>
> Bob
Is it a COM component? If so, you should probably call the
Marshal.ReleaseComObject method on it.
Chris