Re: Objective-C vs. Java
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