RQShineLabel
RQShineLabel copied to clipboard
about memory handle
when you add this label in the controller, and push out then push back, loop this operation, the memory will rise up , what I should do at this time?
Can you share some demo code? Is the label already animating when the view controller is presented?
I have a rootViewController and then I add the shineLabel in another viewController, then I click a button in rootViewController to push viewController in
[self.navigationController pushViewController:tvc animated:YES];
then I write some code in viewController pushed in
- (void)viewDidLoad {
//some code before this
//then I add the shineLabel in a scrollView
_shineLabel = [[RQShineLabel alloc] initWithFrame:CGRectMake(25, 50, 270, kScreenHeight-48)];
_shineLabel.numberOfLines = 0;
_shineLabel.textColor = [UIColor redColor];
_shineLabel.text = @"紫微斗数讲解最好使用一个实例说明之。本应用将举两个例子,在「学习装盘」中以一个是阴年出生的女性(称为阴女)举例;另一个是阴年出生的男性(称阴男)将在「试装盘」中举例。请跟随我的两个例子,一步步实现紫薇斗数的装盘,与分析星情,判断人生。\n学习装盘例子:2001年10月28日,农历辛巳年九月十二日,06:00 生,女性,无名氏";
_shineLabel.backgroundColor = [UIColor clearColor];
[_shineLabel sizeToFit];
[_contentScrollView addSubview:_shineLabel];
}
and add some code in the viewDidAppear:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[_shineLabel shine];
}
then I push back to rootViewController
[self.navigationController popViewControllerAnimated:YES];
I loop this operation for many times, then the memory always rises up
When you pop, in the same time, your animation is doing his work, the cadisplay link isn't be delloc。Your memory will rise up, it's my thinking.
I've a similar issue, after many shine the app crash due out of memory issue.
There are def leaks. I've got a swift-ready version ready to--hopefully--be uploaded soon!!!
will investigate the issue these two days 😬
On Sep 18, 2016, 8:06 PM +0800, Simon [email protected], wrote:
There are def leaks. I've got a swift-ready version ready to--hopefully--be uploaded soon!!!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub (https://github.com/zipme/RQShineLabel/issues/8#issuecomment-247843923), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAAk2oIxG-_5r8KQLZPGGX5VUDI90tZqks5qrSkugaJpZM4CcBOq).