• 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: Art Isbell <email@hidden>
  • Date: Wed, 25 Jul 2001 14:17:09 -1000

On Wednesday, July 25, 2001, at 02:02 PM, Mike Shields wrote:

The one thing I'm looking for is Stack-based objects so I can use scoping to automatically cleanup allocated resources (memory, open files, etc). It's the one thing I miss from C++ (other than variables anywhere, but you can get around that pretty easily with brackets)

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

Art Isbell
Apple iServices Technical Support
http://www.apple.com/iservices/webobjectssupport/
+1-808-591-0836


  • Follow-Ups:
    • Re: Objective-C vs. Java
      • From: Greg Sanborn <email@hidden>
    • Re: Objective-C vs. Java
      • From: Vladimir Makovsky <email@hidden>
    • Re: Objective-C vs. Java
      • From: Mike Shields <email@hidden>
References: 
 >Re: Objective-C vs. Java (From: Mike Shields <email@hidden>)

  • Prev by Date: Re: Objective-C vs. Java
  • Next by Date: Re: exited due to signal 10 (SIGBUS).
  • Previous by thread: Re: Objective-C vs. Java
  • Next by thread: Re: Objective-C vs. Java
  • Index(es):
    • Date
    • Thread