• 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: Vladimir Makovsky <email@hidden>
  • Date: Thu, 26 Jul 2001 10:14:07 -0400

> You won't be finding them in Objective-C even after the ObjC++
> compiler is available. Autoreleased Objective-C objects are almost
> equivalent to stack objects in that they are automatically deallocated.
>
> A downside to stack objects is the need to allocate a larger
> stack. Objects require considerably more stack memory than primitive
> types, so one runs the risk of running out of stack memory. There is no
> free lunch...

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...


If ObjC/C++ does not have this feature - it certainly got room for
improvements...

As of available stack size: needs to be checked.

Hope in OS X there will System API for that?

best,
vlad


  • Follow-Ups:
    • Re: Objective-C vs. Java
      • From: Kent Sandvik <email@hidden>
References: 
 >Re: Objective-C vs. Java (From: Art Isbell <email@hidden>)

  • Prev by Date: Memory limitation of NSScrollView
  • Next by Date: how to sort an array descending
  • Previous by thread: Re: Objective-C vs. Java
  • Next by thread: Re: Objective-C vs. Java
  • Index(es):
    • Date
    • Thread