On 1 Aug '08, at 11:54 AM, Clark S. Cox III wrote:
There are ways to trick the runtime into treating an area of the stack as of it were an object, but the caviats are a list as long as my arm--it's just not worth it.
Yup. The main problem is refcounting — if there were still references to such an object at the time that its stack frame exited, the program would be hosed, because the object's storage would unavoidably be gone.
In addition, support for stack-based objects inevitably ends up requiring all sorts of other runtime support to handle situations like passing the object by value as a function parameter, returning it from a function, embedding it inside another object, and so on. That's why C ++ has tricky things like copy constructors and member initialization clauses.
—Jens_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]