Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

疑似内存泄漏问题 #18

Closed
canren opened this issue Jul 27, 2021 · 3 comments
Closed

疑似内存泄漏问题 #18

canren opened this issue Jul 27, 2021 · 3 comments

Comments

@canren
Copy link
Contributor

canren commented Jul 27, 2021

使用版本 hyperf-ext/jwt 版本v2.1.*

每次请求接口,经过 jwt组件HyperfExt\Jwt\Jwt::getParser(): Parser 方法时, 下面代码

    /**
     * Get the parser instance.
     */
    protected function getParser(): Parser
    {
        return new Parser();
    }

内存就会泄漏

lcobucci/jwtLcobucci\JWT\Claim\Factory::__construct(array $callbacks = []) 存在循环引用问题,内存不会被释放

@canren canren closed this as completed Jul 28, 2021
@canren canren reopened this Jul 28, 2021
@canren
Copy link
Contributor Author

canren commented Jul 28, 2021

我修改了一下 Lcobucci, 提交了 pr, 不知道是否会给修复

@canren
Copy link
Contributor Author

canren commented Jul 28, 2021

V4版本解决了这个问题,作者建议升级 V4 版本,lcobucci/jwt#771

@ericyzhu
Copy link
Member

更新了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants