Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Implementing IDisposable in a class
Message
From
11/02/2014 16:39:18
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Implementing IDisposable in a class
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01594093
Message ID:
01594093
Views:
51
I was wondering about implementing IDisposable in a specific class. I read somewhere the following:

"You should only implement IDisposable if your class holds instances of other classes that implement IDisposable, or if it holds native resources."

My class is basically a high level class for SOAP SVC. It is not clear if I should implement this or not.

I have this robot process which can fire up to 50 requests to a service in a loop. In that loop, I create a new object to loSOAPSVC class. By creating a new object on top of it in the For/Next, is this thread safe or there is a cleanup (best practice) that I should do at the end of the loop to clean it up?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform