[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++)
From: |
Helge Hess |
Subject: |
Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++) |
Date: |
Tue, 20 Nov 2001 10:04:41 +0100 |
Ziemowit Laski wrote:
> I've been working with ObjC/ObjC++ for almost a year now, and the thing I
> miss the most is the ability to instantiate ObjC classes or the stack
> or in file scope, a la C++. As I understand it, though, this may not
> be possible to accomplish since 'alloc...' is not always cleanly
> separated from 'init...' in many class implementations. Also, some
> clever syntax for initializing such objects would have to be invented.
Well, it's not syntax for it, but in libFoundation you can allocate
objects from the stack using the StackZone:
#include <Foundation/StackZone.h>
{
StackZone *zone;
id stackAllocated;
zone = [[Stack alloc] init];
stackAllocated = [[NSMutableString allocWithZone:zone] init];
}
But IMHO this makes things very complicated to track ... (what happens
if someone outside retain's the string ...)
Greetings
Helge
--
SKYRIX Software AG - http://www.skyrix.com
Web Application Technology for Enterprises
- NSInvocations (was Re: PROPOSAL: Objective-C++), (continued)
- Re: PROPOSAL: Objective-C++, Stephen Peters, 2001/11/19
- Re: PROPOSAL: Objective-C++, Helge Hess, 2001/11/20
- Re: PROPOSAL: Objective-C++, Stefan Böhringer, 2001/11/20
- Re: PROPOSAL: Objective-C++, Ovidiu Predescu, 2001/11/19
- Re: PROPOSAL: Objective-C++, Björn Gohla, 2001/11/19
- ObjC additions (Was: Re: PROPOSAL: Objective-C++), Stefan Urbanek, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Ovidiu Predescu, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Ziemowit Laski, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++),
Helge Hess <=
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Björn Gohla, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Bjoern Giesler, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Björn Gohla, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Philippe C.D. Robert, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Philippe C.D. Robert, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Markus Grabert, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Markus Grabert, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Pascal Bourguignon, 2001/11/19
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Dan Pascu, 2001/11/20
- Re: ObjC additions (Was: Re: PROPOSAL: Objective-C++), Balazs Pataki, 2001/11/20