Yup. :) That's exactly why I chose an NSMapTable.

NSMapTables allow you to customize the retention options for keys and for
values. I'm reasonably sure that the default (strong) is sufficient in both
cases with ARC. Seem right to you?


On Mon, Nov 11, 2013 at 2:18 PM, Jerry Hsu <notifications@github.com> wrote:

> In GCMNavStackMachine/GCMNavStackMachine/GCMNavStackMachine.m:
>
> > +  }
> > +  return self;
> > +}
> > +
> > +- (void)dealloc {
> > +  self.navigationController.delegate = nil;
> > +}
> > +
> > +
> > +- (void)onEvent:(NSString *)event
> > +  forController:(UIViewController *)controller
> > +        doBlock:(void (^)(id payload))block {
> > +  if ( ! [self.controllerEventHandlers objectForKey:controller] ) {
> > +    [self.controllerEventHandlers setObject:[[NSMutableDictionary alloc] init] forKey:controller];
> > +  }
> > +  NSMutableDictionary *blockMap = [self.controllerEventHandlers objectForKey:controller];
>
> Oh, I see controllerEventHandlers is a NSMapTable.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/gamechanger/GCMNavStackMachine/pull/1/files#r7569714>
> .
>