• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?


  • Subject: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • From: Siegfried <email@hidden>
  • Date: Sun, 12 Dec 2010 20:58:59 -0200

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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
      • From: WT <email@hidden>
    • Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
      • From: Kyle Sluder <email@hidden>
References: 
 >[iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then? (From: WT <email@hidden>)

  • Prev by Date: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Next by Date: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Previous by thread: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Next by thread: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Index(es):
    • Date
    • Thread