pigeon icon indicating copy to clipboard operation
pigeon copied to clipboard

Reference cycle issues

Open hallee opened this issue 7 years ago • 0 comments

Seeing some memory leaks on most routes, most likely due to db requests via query(on: request) which is apparently not best practice.

func routes(_ container: Container) throws -> EngineRouter {
    let router = EngineRouter.default()
    router.get("test") { req in
        return container.withPooledConnection(to: .psql) { ... }
    }
    return router
}

hallee avatar Feb 19 '19 14:02 hallee