나는 (예) 메모리 문제가 내가 정의의 UIView에서 다음과 같은 방법으로) 아이폰 OS에 새로운 오전 :할당이 취소 된 인스턴스 | "프로세스가 존재하지 않기 때문에 Malloc_history가 XYZ 프로세스를 검사 할 수 없습니다."
구현에 관련된 압력을 원하고 레이블을 그립니다
....
@property (nonatomic, retain) NSString * pressureTextLabel;
....
헤더 파일 촉감. 모두가 한이 다음과 같은 방법이 특정 터치 감지 된 압력을 업데이트하기 위해 컨트롤러에 의해 호출되지 않기 때문에 잘 작동
- (void)drawRect:(CGRect)theRect{
CGRect rect = self.bounds;
CGRect ringRect = CGRectInset(rect, 100, 100);
// Outer ring.
UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:ringRect];
ringRect = CGRectInset(rect, 60, 60);
[path appendPath:[UIBezierPath bezierPathWithOvalInRect:ringRect]];
path.usesEvenOddFillRule = YES;
[self.color set];
[path fill];
//text label
rect = CGRectMake(100, 20, 100, 100);
//This one seems to be the troublemaker
[pressureTextLabel drawInRect:rect withFont:[UIFont systemFontOfSize:14.0]];
}
: 모든 손가락 터치는이 뷰의 객체를 생성합니다. shell malloc_history <PID> 0x17dfb0
을 : 응용 프로그램이 충돌하면 내가 디버그 콘솔의 메모리 추적을 조사했다
*** -[CFString drawInRect:withFont:]: message sent to deallocated instance 0x16e8c0
:
-(void) setTouchPressureTo: (float) pressure{
pressureTextLabel = [NSString stringWithFormat:@"%f", pressure];
[self setNeedsDisplay];
}
나는 다음과 같은 오류가 발생합니다. 결과적으로 콘솔은 다음을 반환합니다.
malloc_history cannot examine process 5838 because the process does not
이 있습니다.이
- 누군가가, 명백한이 유지 해제 문제를 여기에서 볼 수있다 : 그래서 여기에 질문
?
malloc_history <PID> <Address
> 은 어떻게 작동합니까?
시간을 내 주셔서 감사합니다.
기독교
디버거에서 앱을 실행하면 충돌 후 프로세스가 계속 실행되어 malloc_history를 실행할 수 있습니다. –