even if you run it in debug and stop just after calling GC.Collect() ? if that's the case then i'm confused!
-----Original Message----- From: Rama Krishna [mailto:[EMAIL PROTECTED]] Sent: 20 May 2002 16:45 To: [EMAIL PROTECTED] Subject: Re: [DOTNET] strange behaviour with Garbage Collector I wrote the same application and it works fine for. Excel does go away. -----Original Message----- From: Howard Bartfield [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 11:41 AM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] strange behaviour with Garbage Collector Hi Jason yes, calling ReleaseComObject does the job. however, I'm just concerned to find out why the Garbage Collection doesn't work in the first example, but does in the second. Regards Howard. -----Original Message----- From: Jason Bock [mailto:[EMAIL PROTECTED]] Sent: 20 May 2002 16:39 To: [EMAIL PROTECTED] Subject: Re: [DOTNET] strange behaviour with Garbage Collector >does anyone have any ideas on the following: > >if I try this: > >Excel.ApplicationClass appClass = new Excel.ApplicationClass(); >appClass = null; GC.Collect(); > >Excel.exe remains open as a Process in Task Manager. Have you tried this: Excel.ApplicationClass appClass = new Excel.ApplicationClass(); // Use appClass... Marshal.ReleaseComObject(appClass); appClass = null; This will release the COM object reference (at least it should). Regards, Jason You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.