allending/Kiwi — pull request #461 by supermarin (2014-02-27 01:32:40+00:00)
Title: Convert KWIntercept to ARC

This PR is a step forward of migrating Kiwi to ARC.
As I wouldn't like the PR to get too big, this one is just converting KWIntercept and collaborating users.

Before, message patterns (selectors) were kept in an `NSMutableDictionary`.
We needed to override `-copyWithZone` to avoid copying them as keys and referencing the right objects.

We were also wrapping stubs as nonretained NSValues, and unwrapping them later.
This removes NSValue wrapping as well, and stores objects directly into `NSMapTable`.

As this might introduce some memory leaks (haven't tested properly on many apps), I'd appreciate if you could run tests over as many production apps and report here if it behaves any different from `HEAD`.

cc/ @modocache @stepanhruda @allending @lukeredpath