Explicitly implemented IDisposable troubles

Use this forum to discuss and/or suggest future improvements of .NET Memory Profiler and to report bugs.

Moderator: SciTech Software

Explicitly implemented IDisposable troubles

Postby tleko » Fri Jul 07, 2006 6:15 am

When a class explicitly implements an IDisposable interface the dispose tracker doesn't recognise the dispose call so all instances of this class will be marked as not disposed in the dispose tracker.

Example:
> class Class1
> {
> /// <summary>
> /// The main entry point for the application.
> /// </summary>
> [STAThread]
> static void Main(string[] args)
> {
> //snapshot 1
> Console.ReadLine();
> f();
> //snapshot 2
> Console.ReadLine();
> }
>
> public static void f() {
> using(T t = new T()) {
>
> }
> }
>
> public class T : IDisposable {
> void IDisposable.Dispose() {
> Trace.WriteLine("Disposed");
> }
> }
> }


getting snapshots 1 and 2 will mark an instance of type T as not disposed.
tleko
 
Posts: 1
Joined: Fri Jul 07, 2006 6:09 am

Postby Andreas Suurkuusk » Fri Jul 07, 2006 8:41 am

Thank you for the information. This seems to be a bug that was introduced by a code change in a recent release. We have now fixed this problem and we will release an update within a few days.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 963
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden


Return to Future Improvements

Who is online

Users browsing this forum: Bing [Bot] and 8 guests

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.


SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla
Sweden


E-mail: mail@scitech.se

Telephone: +46-706868081

cron