• 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: Date pickers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date pickers


  • Subject: Re: Date pickers
  • From: Craig Williams <email@hidden>
  • Date: Fri, 26 Feb 2010 17:24:41 -0700

Rob,
You sent me the script above which I have used to get some dates.
Researching it further, in Objective-C, every time you alloc() something you have to dealloc()
So I used in my code

---
current application's class "NSDateFormatter"'s dealloc()
---

It compiles and run with no problem. 
So, I am not sure, but being cautious apparently does not cause any problem.

Deivy Petrescu
email@hidden

Hey Rob,

You should never call dealloc except when calling [super dealloc] in a dealloc method.
Instead you will call release on the object that needs freeing.

What you are doing above is not releasing the object that was created, which was myFormatter,
but instead, you are calling the dealloc() method on the class NSDateFormatter. I am not sure what that does
but you should not do it.

The correct way to release myFormatter is:
myFormatter's release()

Regards,

Craig
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Date pickers
      • From: Deivy Petrescu <email@hidden>
References: 
 >Re: Date pickers (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Date pickers
  • Next by Date: Re: Date pickers
  • Previous by thread: Re: Date pickers
  • Next by thread: Re: Date pickers
  • Index(es):
    • Date
    • Thread