gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segfault in -[NSObject dealloc]


From: Philippe C.D. Robert
Subject: Re: Segfault in -[NSObject dealloc]
Date: Fri, 19 May 2006 08:37:42 +0200

On 19.05.2006, at 07:12, Michael Gardner wrote:

Ah, I thought I couldn't use the usual alloc method since I'm obtaining the Class dynamically. I didn't even realize you could do something like the following:

[objc_getClass("Foo") alloc]

since I'm used to static methods as they're implemented in C++ and Java, and forgot that class methods in Obj-C realy are just instance methods of a Class object. Got some unlearning to do, it seems...

And why aren't you using

[NSClassFromString(@"Foo") alloc]

instead? You rarely have to use runtime functions directly IMO.

-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip






reply via email to

[Prev in Thread] Current Thread [Next in Thread]