Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Implementing IDisposable in a class
Message
De
12/02/2014 04:04:11
 
 
À
11/02/2014 22:26:10
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01594093
Message ID:
01594119
Vues:
44
>This has been resolved.
>
>A memory leak applies in .NET in regards to using a SOAP Service and using System.ServiceModel.OperationContextScope. This is not picked up by the GC and not released as it should when the object is released. Encapsulation in Using was necessary.

Your SOAPSVC class implements IDisposable but does nothing on Dispose(). Based on your current code it should call oOperationContextScope.Dispose() - I don't see how you can implement Using here:
loSOAPSVC.oOperationContextScope = New System.ServiceModel.OperationContextScope(loMyService.InnerChannel)

See: http://msdn.microsoft.com/en-us/library/ms244737.aspx on the correct pattern for Dispose()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform