• 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: Objective-C vs. Java
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C vs. Java


  • Subject: Re: Objective-C vs. Java
  • From: Kent Sandvik <email@hidden>
  • Date: Thu, 26 Jul 2001 10:56:11 -0700

on 7/26/01 7:14 AM, Vladimir Makovsky at email@hidden wrote:

> I found stack based objects *EXTREMELY USFULL*. It's hard to underestimate
> automatic clean up of allocated resource or automatic settings restoration.
> Just makes you code simple and effective - and you *ALWAYS* know when clean
> up will happen - on out of scope step.
> One thing when you detect error inside you function call and decide to get
> out, other thing when you call other functions hierarchy and somewhere down
> there one of them will throw...

Yep. It' very handy, especially with small utility classes that with the
constructor saves state, does a thing, and the destructor at the end
triggers that the state is restored. Good with graphics programming, for
example.

Also, small objects that are constantly created/deleted makes the heap
fragmented, even with a VM system it's an issue. Placing these in the stack
frame and when deleted eliminates this performance issue, as well. --Kent


References: 
 >Re: Objective-C vs. Java (From: Vladimir Makovsky <email@hidden>)

  • Prev by Date: Re: NSOutlineView
  • Next by Date: Re: How is @selector resolved at compile time ?
  • Previous by thread: Re: Objective-C vs. Java
  • Next by thread: Re: Objective-C vs. Java
  • Index(es):
    • Date
    • Thread