Compartir a través de


MvcForm.Dispose Method

Releases all resources that are used by the current instance of the MvcForm class.

Namespace:  System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Sub Dispose
public void Dispose()
public:
virtual void Dispose() sealed

Implements

IDisposable.Dispose()

Remarks

This method renders the closing </form> tag at the end of a Using statement.

Call Dispose when you are finished using the MvcForm instance. The Dispose method leaves the MvcForm instance in an unusable state. After you call Dispose, you must release all references to the MvcForm instance so that the garbage collector can reclaim the memory that the MvcForm instance was occupying.

For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

See Also

Reference

MvcForm Class

Dispose Overload

System.Web.Mvc.Html Namespace