Laurent Sansonetti
lsans****@apple*****
Fri Oct 26 00:03:42 JST 2007
Hi Kimura-san, On Oct 25, 2007, at 4:00 PM, kimura wataru wrote: > Hi Laurent, > > It's cool! "new" is very shorter than "alloc.init". Yes definitely, PyObjC also allows it. > I wrote a few tests for object ownership by "new". > ocm_retain_arg_if_necessary() in objc/mdl_objwrapper.m > works fine with "new", too. Nice, it seems that ocm_retain_arg_if_necessary already supports new (I don't remember having wrote this line though, it was maybe during my sleep? :-)) if (!OBJCID_DATA_PTR(result)->retained && selector != @selector(alloc) && selector != @selector(allocWithZone:) && selector != @selector(new) // <--- HERE && selector != @selector(copy) && selector != @selector(mutableCopy)) { I committed the patch that I showed in my previous message, as r2093. Could you commit yours for the new tests? Laurent