In my 9.x projects using the Geoprocessor, I would use the ESRI.ArcGIS.ADF.ComReleaser.ReleaseCOMObject at the end of the geoprocessing routine. Here's an example (in VB.NET). However, I'm not sure what to use in ArcGIS 10
Friend Sub DeleteDataset(ByVal InputName As Object)
Dim DSDelete As New ESRI.ArcGIS.DataManagementTools.Delete
Dim Result As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult
Try
DSDelete.in_data = InputName
Result = RunTool(DSDelete, Nothing)
If Result Is Nothing Then System.Windows.Forms.MessageBox.Show("Unable to delete dataset '" & InputName & "'", "Unable to delete", Windows.Forms.MessageBoxButtons.OK, Windows.Forms.MessageBoxIcon.Exclamation)
Catch ex As Exception
ExceptionMessage(ex, "Delete Dataset")
Finally
ESRI.ArcGIS.ADF.ComReleaser.ReleaseCOMObject(DSDelete)
End Try
End Sub