logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe <Jocular...@hotmail.com>
Subject Should an Appender be IDisposable?
Date Fri, 21 Oct 2016 19:57:00 GMT
I think the answer is probably yes: a FileAppender owns an IDisposable Stream, and other appenders
probably own IDisposable objects.

I would suggest having AppenderSkeleton implement IDisposable, rather than IAppender.  The
Dispose method would call OnClose.

I also notice that AppenderSkeleton has a finalizer, which it shouldn't as it doesn't own
any unmanaged resources.

Do you see any problems with making the above changed?

Mime
View raw message