ObjScheme expects +0.  Any retention is done by attaching things into scope
objects.  So this looks right to me.


On Tue, Oct 8, 2013 at 5:12 AM, Phil Sarin <notifications@github.com> wrote:

> In ObjScheme/ObSNS.m:
>
> > @@ -37,6 +37,27 @@ + (void)initializeBridgeFunctions:(ObSScope*)scope {
> >          return dict;
> >        }]];
> >
> > +  [scope defineFunction: [ObSNativeLambda named: SY(@"NSMutableDictionary:whitelist")
> > +                                      fromBlock: ^(ObSCons* args) {
> > +        NSDictionary* dict = CAR(args);
> > +        NSMutableDictionary* new_dict = [NSMutableDictionary dictionary];
> > +        for ( id key in CDR(args) ) {
> > +          new_dict[key] = dict[key];
> > +        }
> > +        return new_dict;
>
> Concerned about memory bugs here. New_dict is auto released. Are objscheme
> functions expected to return objects with +0 retain count? +1? Ask @kiril<https://github.com/kiril>
>
> Also, objc convention is to camel case variable names.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/gamechanger/objscheme/pull/28/files#r6820384>
> .
>



-- 
Kiril Savino
GameChanger Media, Inc.
www.gamechanger.io