私は(はい;)メモリの問題を持っているカスタムUIViewの中に、以下の方法で、私はiOSのに新しいです):割り当て解除されたインスタンス| "プロセスが存在しないため、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 <PID> <Address
> を取得するにはどうすればよいですか?
ありがとうございます、リダイレクトと回答!
クリスチャン
デバッガでアプリケーションを実行すると、クラッシュ後にプロセスが固執し、malloc_historyを実行できます。 –