[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

Getting rid f objects left open by webservice

Stuart Hemming (via DFN-CIS NetNews Service)

2/25/2004 11:45:00 AM

I have a web service that calls a COM object. When the service is
called it leaves copies of the COM object running on the server.

Reading through the newsgroup I see tantalizing hints at methods like
Close and Dispose but that's all they are. What are they methods /of/?
I've so far failed to find any meaningful clues on MSDN either

I've tried putting Dispose(); in both the service code and the caller
code but to no avail.

Can someone tell me the whole of the spell needed to make my unwanted
objects go away please?

--
Stuart
See headers for PGP Key.
A lot of money is tainted. It taint yours and it taint mine.

2 Answers

Stuart Hemming (via DFN-CIS NetNews Service)

2/26/2004 10:11:00 AM

0

On 25/02/2004, around 10:09, Stuart Hemming (via DFN-CIS NetNews Service) wrote:

SH> I have a web service that calls a COM object. When theservice is
SH> called it leaves copies of the COM object running on the server.

....

SH> Can someone tell me the whole of the spell needed to make
SH> myunwanted objects go away please?
No one? At All?


--
Stuart
See headers for PGP Key.
I have seen the truth and it makes no sense.

Stuart Hemming (via DFN-CIS NetNews Service)

2/26/2004 1:42:00 PM

0

On 25/02/2004, around 13:39, Stuart Hemming (via DFN-CIS NetNews Service) wrote:

SHvDCNS> Can someone tell me the whole of the spell needed to make my unwanted
SHvDCNS> objects go away please?

It turns out to be very simple ...

,----- [ ]
| // Add this to the list of namespaces in your .cs file
| using System.Runtime.InteropServices;
| ...
| // Once you've finished with your object
| Marshal.ReleaseComObject(myComObject);
`-----

--
Stuart
See headers for PGP Key.
I have seen the truth and it makes no sense.