Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ce77c273
authored
2013-05-08 13:56:48 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add Destructor func
1 parent
d2e0960b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
controller.go
router.go
controller.go
View file @
ce77c27
...
...
@@ -59,6 +59,10 @@ func (c *Controller) Prepare() {
}
func
(
c
*
Controller
)
Finish
()
{
}
func
(
c
*
Controller
)
Destructor
()
{
if
c
.
CruSession
!=
nil
{
c
.
CruSession
.
SessionRelease
()
}
...
...
router.go
View file @
ce77c27
...
...
@@ -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
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment