View Issue Details

IDProjectCategoryView StatusLast Update
0000448.NET APIImplementation Bugpublic2010-12-20 02:13
Reporterkeke Assigned ToRandy Armstrong  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000448: Invalid IDisposable implementation
Description

I've been looking into the source code and for me it seems there is a bug in the IDisposable implementation in every class which implements it.

.NET Framework Developer's Guide
Implementing Finalize and Dispose to Clean Up Unmanaged Resources
http://msdn.microsoft.com/en-us/library/b1yfkh5e.aspx

I found the following things:

As far as I can see the IDisposable implementations do not implement destructor (~) for finalization.

There is no check if the object has already been disposed

There is no support for object disposing when there is a inheritance hierarchy. Normally this is done by implementing protected Dispose() method as you can see from the link.

Easiest way is just to search for IDisposable or Dispose(). E.g. you can look into Opc.Server which has Dispose() method (which is actually virtual?). I'm not sure but this might be related to the fact that even though I Dispose() all the objects I still receive data updates from the OPC server for the subscriptions.

Steps To Reproduce

Search for Dispose( or see which classes implement IDisposable interface

TagsNo tags attached.

Activities

Randy Armstrong

2008-08-28 08:12

administrator   ~0000784

This will take some time to resolve.

Randy Armstrong

2010-12-20 02:13

administrator   ~0002203

Dispose() implementations fixed.

Issue History

Date Modified Username Field Change
2008-08-25 14:03 keke New Issue
2008-08-28 08:12 Randy Armstrong Note Added: 0000784
2008-08-28 08:12 Randy Armstrong Status new => acknowledged
2010-12-20 02:13 Randy Armstrong Status acknowledged => resolved
2010-12-20 02:13 Randy Armstrong Resolution open => fixed
2010-12-20 02:13 Randy Armstrong Assigned To => Randy Armstrong
2010-12-20 02:13 Randy Armstrong Note Added: 0002203