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

Memory Leak when use MLeaksFinder #30

Closed
hell03W opened this issue Aug 5, 2018 · 2 comments
Closed

Memory Leak when use MLeaksFinder #30

hell03W opened this issue Aug 5, 2018 · 2 comments

Comments

@hell03W
Copy link

hell03W commented Aug 5, 2018

问题:项目中同时集成MLeaksFinder, 打开CocoaDebug的"SandBox"页面, 点击左上角关闭, MLeaksFinder报Memory Leak.

原因:经检查, 关闭后, SandboxViewController控制器仍然被Sandbox的单例对象持有, 导致无法被正常销毁.

解决:Sandbox的homeDirectoryNavigationController方法每次返回新的UINavigationController.

- (UINavigationController *)homeDirectoryNavigationController {
    SandboxViewController *sandboxViewController = [[SandboxViewController alloc] init];
    sandboxViewController.homeDirectory = YES;
    sandboxViewController.fileInfo = [[MLBFileInfo alloc] initWithFileURL:self.homeFileURL];
    UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:sandboxViewController];
    return navi;
}
@CocoaDebug
Copy link
Owner

感谢热心的同行!其实您如果已经有了解决方案,也可以提PR哟~

@CocoaDebug
Copy link
Owner

新版本已经发布,已经解决此bug,请更新。
谢谢~

@CocoaDebug CocoaDebug added the bug Something isn't working label Aug 6, 2018
@CocoaDebug CocoaDebug removed the bug Something isn't working label Apr 2, 2019
@CocoaDebug CocoaDebug changed the title 使用MLeaksFinder会检测到Memory Leak Memory Leak when use MLeaksFinder Jun 9, 2019
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