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

可能内存泄漏JhFormTableView #26

Closed
anotherL opened this issue Jul 27, 2022 · 1 comment
Closed

可能内存泄漏JhFormTableView #26

anotherL opened this issue Jul 27, 2022 · 1 comment

Comments

@anotherL
Copy link

继承 JhFormTableViewVC

  • (void)viewDidLoad {
    [super viewDidLoad];

    [self setNav];
    [self initModel];

}

  • (BOOL)hidesBottomBarWhenPushed{
    return YES;
    }

#pragma mark - setNav
-(void)setNav{

self.Jh_navTitle = @"帮助中心";

// self.Jh_hiddenDefaultFooterView = YES;
self.view.backgroundColor = [UIColor whiteColor];
self.Jh_formTableView.backgroundColor = [UIColor whiteColor];
self.Jh_formTableView.separatorColor = [UIColor clearColor];

}
#pragma mark - initModel
-(void)initModel{
__weak typeof(self) weakSelf = self;

NSMutableArray *cellArr0 = [NSMutableArray array];
JhFormCellModel *cell1 = JhFormCellModel_AddRightArrowCell(@"常见问题", @"");

self.Jh_submitStr = @"我要反馈";
self.Jh_submitBtn.backgroundColor = defaultThemeColor;
self.Jh_formSubmitBlock = ^{
    NSLog(@" 点击提交按钮 ");

};

[cellArr0 addObjectsFromArray: @[cell1]];
JhFormSectionModel *section0 = JhSectionModel_Add(cellArr0);

[self Jh_addSectionModel:section0];
}

添加这个到模型数组 [self Jh_addSectionModel:section0]; ,不添加这句不提示。
第三方检测工具MLeaksFinder 提示
Possibly Memory Leak.
In case that JhFormTableView should not be dealloced, override -willDealloc in JhFormTableView by returning NO.
View-ViewController stack: (
HelpCenterViewController,
UIView,
JhFormTableView
)

@iotjin
Copy link
Owner

iotjin commented Aug 13, 2022

已修复

@iotjin iotjin closed this as completed Sep 12, 2022
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