On Wed, Sep 21, 2016, at 09:22 AM, Steve Mills wrote:
> On Sep 21, 2016, at 08:53 AM, Alex Zavatone <z...@mac.com> wrote:
> 
> Stab in the dark here, but I'm stabbing blank. Is there an Instruments
> tool or debugging option to detect this? 
> 
> Thanks for getting stabby. Fourvel appreciates it (only relevant if
> you're a CBB fan). It doesn't appear that anything will detect this. When
> zombies is on, it says an address is attempting to be retained but was
> previously released. That's a bit of a red herring, since the only 2
> variables being uses have just been declared and initialized right before
> the call to the method. If anything, the process of converting to ARC or
> the static analyzer should've flagged this as a problem.

Are you able to reproduce this in a sample app? I tried the following
but got no crash:

#include <stdio.h>
#import <Foundation/Foundation.h>

static void foo(NSString **fillMeIn) {
        [@[@"a"] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx,
        BOOL *stop) {
                *fillMeIn = obj;
                *stop = YES;
        }];
}

int main(int argc, char **argv) {
        @autoreleasepool {
                NSString *out;
                foo(&out);
                printf("%s", out.UTF8String);
        }
        return 0;
}


--Kyle
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to