mirror of
https://github.com/astaxie/beego.git
synced 2025-06-19 11:10:41 +00:00
add Destructor func
This commit is contained in:
@ -59,6 +59,10 @@ func (c *Controller) Prepare() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Controller) Finish() {
|
func (c *Controller) Finish() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Controller) Destructor() {
|
||||||
if c.CruSession != nil {
|
if c.CruSession != nil {
|
||||||
c.CruSession.SessionRelease()
|
c.CruSession.SessionRelease()
|
||||||
}
|
}
|
||||||
|
@ -388,6 +388,8 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
method = vc.MethodByName("Destructor")
|
||||||
|
method.Call(in)
|
||||||
}
|
}
|
||||||
|
|
||||||
//if no matches to url, throw a not found exception
|
//if no matches to url, throw a not found exception
|
||||||
|
Reference in New Issue
Block a user