On 12/12/2010, at 20:41, WT wrote: > Hello, > > according to the iOS 4.2 NSDateFormatter class documentation, the -init > method is available in iOS 2.0 through iOS 3.2,
Sorry, but the init method? Just to confirm, where exactly in the documentation did you read about this? > but it does not offer an alternative method to initialize a newly allocated > date formatter (or, if it does, I missed it on repeated readings of the > docs). How then? Are you sure you mean init method? > > I went ahead and tried -init anyway and, sure enough, a problem arises: > > malloc: *** error for object 0x4d6c9b0: pointer being freed was not allocated > *** set a breakpoint in malloc_error_break to debug > > Doing as suggested, I see the following call stack: > > #0 0x916d1f82 in malloc_error_break > #1 0x915e1b63 in free > #2 0x0005aa09 in icu::DateFormatSymbols::dispose > #3 0x0005a98c in icu::DateFormatSymbols::~DateFormatSymbols > #4 0x0005a8a6 in icu::SimpleDateFormat::~SimpleDateFormat > #5 0x01165b39 in __CFDateFormatterDeallocate > #6 0x010e9bcb in _CFRelease > #7 0x002963ac in -[NSDateFormatter _regenerateFormatter] > #8 0x0000315d in -[AppDelegate dateFormatter] at AppDelegate.m:144 > I can be quite wrong, but looks like this log has nothing to do with init. 1.There is a bug in the framework 2.Would be interesting to check what happens in self.localePtBr maybe? > And here's the -[AppDelegate dateFormatter] method I have: > > - (NSDateFormatter*) dateFormatter; > { > if (dateFormatter_ == nil) > { > … > > [dateFormatter_ setLocale: self.localePtBr]; > … > } > > return dateFormatter_; > } > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com