[Mono-dev] [Mono-gc-list] Mono memory problems!

Andreas Färber andreas.faerber at web.de
Wed Jul 18 14:36:00 EDT 2007


Am 18.07.2007 um 19:54 schrieb David Wolinsky:

> That case leaks as well.
>
> Regards,
> David
>
> Miguel de Icaza wrote:
>>>         re = new AutoResetEvent(false);
>>>         re.Close();
>>
>> That depends on the finalizer to run to release memory from the
>> unmanaged side, since AutoResetEvent implements IDisposable you  
>> should
>> use it like this:
>>
>> 	using (re = AutoResetEvent (false)) {	
>> 		...

Doesn't Close() call Dispose()? At least for the Stream classes it  
should.

Andreas



More information about the Mono-devel-list mailing list