add Destructor func
Showing
2 changed files
with
6 additions
and
0 deletions
| ... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment