UILabel에 대한 올바른 높이를 설정하기 위해 CGSize를 만들려고 할 때 누수가 발생합니다. 또한 heightForRowAtIndexPath에서 높이를 설정하는 동안 동일한 누수가 발생합니다.메모리 누수가 sizeWithFont : constrainedToSize : lineBreakMode :
유출 된 객체 : ICU :: UCharCharacterIterator 책임 라이브러리 : WebCore 책임 프레임 여기
CGSize size = [news.news sizeWithFont:[UIFont fontWithName:@"HelveticaNeue" size:12] constrainedToSize:CGSizeMake(230.0f, CGFLOAT_MAX) lineBreakMode:NSLineBreakByWordWrapping];
UILabel *newsLabel = [[UILabel alloc] initWithFrame:CGRectMake(65, 50, 230, size.height)];
newsLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:12];
newsLabel.textAlignment = NSTextAlignmentLeft;
newsLabel.text = news.news;
newsLabel.numberOfLines = 0;
newsLabel.lineBreakMode = NSLineBreakByWordWrapping;
newsLabel.textColor = COLOR_DARK_GRAY;
newsLabel.highlightedTextColor = COLOR_WHITE;
newsLabel.backgroundColor = COLOR_CLEAR;
[cell.contentView addSubview:newsLabel];
[newsLabel release];
가 누출 악기에 열거 된 누출입니다 :
이
은 누출 된 코드입니다 : WebCore :: LineBreakIteratorPool :: take (WTF :: AtomicString const &)동일한 줄을 가리키는 다른 누출 :
유출 대상 : ICU :: UCharCharacterIterator 가 책임 라이브러리 : WebCore 책임 프레임 : 아무것도가 있다면 WebCore :: acquireLineBreakIterator이 (서명되지 않은 짧은 CONST는 *, INT, WTF :: AtomicString의 CONST &가)
내가 제공 할 수 그렇게 할 수있어서 기쁩니다. 나는 CGSize 크기의 위의 한 줄을 주석으로 밝혀서 그것이 새는 줄임을 확인했다. 시뮬레이터와 장치 모두에서 발생합니다.
이 경우이 문제가 없습니다. OP의 누수는'UIFont' 객체가 아닙니다. – Mathew