Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / February 2004

Tip: Looking for answers? Try searching our database.

TraceListener.Close when added in the config file...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ryan Cromwell - 26 Feb 2004 19:16 GMT
I have written a trace listener that has at least one worker thread to process an internal buffer.  When Close is called explicitely in the tracelistener hosting application, everthing is fine and dandy.  if i add the TraceListener from the system.diagnostics section of the config file, the Close method doesn't ever get called.  Does anyone have any idea when that method gets called when added through the config file?
Klaus H. Probst - 28 Feb 2004 08:37 GMT
Ryan,

This is a known problem (IMO). The only solution is to add a destructor to
your class and clean up there. The framework will not call
{TraceListener}.Close() or explicitly dispose of the reference.

Signature

____________________
Klaus H. Probst, MVP
  http://www.vbbox.com/

> I have written a trace listener that has at least one worker thread to process an internal buffer.  When Close is called explicitely in the
tracelistener hosting application, everthing is fine and dandy.  if i add
the TraceListener from the system.diagnostics section of the config file,
the Close method doesn't ever get called.  Does anyone have any idea when
that method gets called when added through the config file?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.