Browse Source

Reset cStack's C on release

Previously, we would keep the URLParams / Env associated with a cStack
around until the next request flushed them. However, this might cause
either of these maps to stick around for much longer than they ought to,
potentially keeping references to many, many objects.

Instead, clear out the saved context on every release.
Carl Jackson 12 years ago
parent
commit
5ac81e93fb
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      web/middleware.go

+ 1
- 0
web/middleware.go View File

@ -130,6 +130,7 @@ func (m *mStack) alloc() *cStack {
} }
func (m *mStack) release(cs *cStack) { func (m *mStack) release(cs *cStack) {
cs.C = C{}
if cs.pool != m.pool { if cs.pool != m.pool {
return return
} }


Loading…
Cancel
Save