Encoder - Removal??

  • Thread starter Thread starter Bsmengen
  • Start date Start date
B

Bsmengen

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
 
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

Is it a COM component? If so, you should probably call the
Marshal.ReleaseComObject method on it.

Chris
 
Back
Top