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