ce77c273 by astaxie

add Destructor func

1 parent d2e0960b
...@@ -59,6 +59,10 @@ func (c *Controller) Prepare() { ...@@ -59,6 +59,10 @@ func (c *Controller) Prepare() {
59 } 59 }
60 60
61 func (c *Controller) Finish() { 61 func (c *Controller) Finish() {
62
63 }
64
65 func (c *Controller) Destructor() {
62 if c.CruSession != nil { 66 if c.CruSession != nil {
63 c.CruSession.SessionRelease() 67 c.CruSession.SessionRelease()
64 } 68 }
......
...@@ -388,6 +388,8 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -388,6 +388,8 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
388 } 388 }
389 } 389 }
390 } 390 }
391 method = vc.MethodByName("Destructor")
392 method.Call(in)
391 } 393 }
392 394
393 //if no matches to url, throw a not found exception 395 //if no matches to url, throw a not found exception
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!