Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com
Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com

I am using IXSSO to access Index Server similar to described in  article  Query Index Server with IXSSO in .NET” on  ASP101. (See also my post how to use Fill Dataset with rows in a specified range  http://thespoke.net/blogs/mnf/archive/2005/05/09/92495.aspx).

Recently I found a useful tip to dispose COM objects after the use. I noticed that  it is required to check for null before calling ReleaseComObject. So the finally section should be like this

finally

{ // recommended in http://www.eggheadcafe.com/forumarchives/inetserverindexserver/Aug2005/post23479438.asp

if (rs!=null)Marshal.ReleaseComObject(rs); //Recordset

if (query!=null)Marshal.ReleaseComObject(query); //Query

if (util!=null)Marshal.ReleaseComObject(util); //Utils

query = null;

util = null;

rs=null;

}

 

Posted on Friday, September 23, 2005 8:56 AM None | Back to top


Comments on this post: COM CleanUp when using IXSSO in .Net

# Indexing catalog doesn't return aliased path if single directory is added to scope.
Requesting Gravatar...
See also Indexing catalog doesn't return aliased path if single directory is added to scope http://geekswithblogs.net/mnf/articles/100092.aspx
Left by Michael Freidgeim on Dec 01, 2006 11:20 AM

Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net