The Quit method disconnects all SQLServer objects referenced by an application and forces a release of all application-maintained references on SQL-DMO objects.
object.Quit( )
object
Expression that evaluates to an object in the Applies To list
HRESULT Quit();