Stonefield Query calls the Application.Shutdown script when the application terminates. This can be used to perform any desired cleanup tasks.

Parameters
A reference to the Stonefield Query Application object.

Return Value
Any value (Stonefield Query ignores the return value).

Example
Suppose the Application.AfterSetup script instantiates a COM object and adds it as a property of the Application object. When Stonefield Query shuts down, you may need to call a method of the COM object to clean up after itself or release resources. The following script in Application.Shutdown does this.

Visual FoxPro

lparameters toApplication as SQApplication
toApplication.oCOMObject.CleanupResources()
toApplication.oCOMObject = .NULL.

VBScript

function Main(Application)
Application.oCOMObject.CleanupResources()
Application.oCOMObject = NULL
end function

JavaScript

function Main(Application) {
Application.oCOMObject.CleanupResources() ;
Application.oCOMObject = NULL ;
}

See Also
Application.AfterSetup | Scripts