On Nov 24, 2013, at 2:27 PM, Thomas Tempelmann <notifications@github.com> wrote:

> In macoslib/CoreFoundation/CFType.rbbas:
> 
> >  		    
> > -		    if ref <> nil then
> > -		      call CFRetain(ref)
> > +		    dim ref as CFTypeRef = self.Handle
> > +		    if ref.value <> nil then
> > +		      //CFRetain returns the input value on success.  I chose to write the return value to ref
> > +		      //instead of using Call.  CCY 2013-11-24.
> 
> But why do you keep ref here? It's not used any further, is it? It's just a bit confusing to me: The comment suggests there's more (magic?) to it than there is.
> 
> —
> Reply to this email directly or view it on GitHub.
> 


My thinking here was that since self.Handle is a function, it's safer to copy the return value to a local variable to ensure that the value I test isn't changed before I pass it to CFRetain.  This is probably overkill, since absent a change to the thread model, the value can't be changed anywhere else.