私はその意味を広範囲に調査しました。私の推測では、何とかスタックが壊れているということです。 I取得tiny_free_list_add_ptrとは何ですか?
小さな_ free_ list_ ADD_ PTRという行の第16回の呼び出しで
:
NSDateFormatter *theFormatter = [[NSDateFormatter alloc] init];
問題の原因は何ですか?私はスタックが壊れていると思っていますか?
- (NSString *)formatDate:(NSString *)uglyDate withFormat:(NSString *)theFormat {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSDateFormatter *theFormatter = [[NSDateFormatter alloc] init];
[theFormatter setDateFormat:theFormat];
NSDate *realDateUgly = [NSDate dateWithNaturalLanguageString:uglyDate];
if (realDateUgly == nil)
realDateUgly = [NSDate dateWithString:uglyDate];
NSString *prettyDate = [[NSString alloc] initWithString:[theFormatter stringFromDate:realDateUgly]];
[pool drain];
[pool release];
[theFormatter release];
return prettyDate;
}
ご返信ありがとうございます。私はAutoreleaseセクションをすばやくすっきりとすべきではありませんでした。私はあなたの助言を取り、プールを取り除いた。きれいな日付については、私はこれに変更しました: NSString * prettyDate = [theFormatter stringFromDate:realDateUgly]; 問題はこの機能ではなくなりました。私はCocoaのメモリ管理プログラミングガイドを勉強しています。再度、感謝します。 –
実際、もう1つ:私はまだtiny_free_list_add_ptrが何であるか知りたいです。ちょっと興味があるんだけど。 :) –
おそらくmalloc機構内の内部関数です(空きリストと関係がある)。 –