MvcForm.Dispose Method
Releases all resources that are used by the current instance of the MvcForm class.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | Dispose() | Releases all resources that are used by the current instance of the MvcForm class. |
![]() | Dispose(Boolean) | Releases unmanaged and, optionally, managed resources used by the current instance of the MvcForm class. |
This method renders the closing </form> tag at the end of a Using statement.
MvcForm.Dispose Method ()
Releases all resources that are used by the current instance of the MvcForm class.
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 and .
MvcForm.Dispose Method (Boolean)
Releases unmanaged and, optionally, managed resources used by the current instance of the MvcForm class.
Parameters
- disposing
-
Type:
System.Boolean
true to release both managed and unmanaged resources; false to release only unmanaged resources.
This method is called by the public Dispose method. Dispose invokes the protected Dispose(Boolean) method with the disposing parameter set to true.
When the disposing parameter is true, this method releases all resources held by any managed objects that this MvcForm object references. This method invokes the Dispose method of each referenced object.

