sammcewan/WYPopoverController — pull request #43 by tkach (2014-12-25 13:33:43+00:00)
Title: Fix potential retain cycle with inView ivar

Hi, @sammcewan
Thanks a lot for supporting this component, it's really helpful and convenient in use.

But I found a possible memory issue that might appear in some cases.

For example, if popover controller should be presented from a view, retain cycle may occur:

```MyView``` creates popover, holds strong reference to ```WYPopoverController```, and calls
```-(void)presentPopoverInRect:rect inView:self ...``` method.

At this moment, WYPopoverController assigns strong reference of ```MYView``` to ```inView``` ivar. But this leads to retain cycle and ```MYView``` and ```WYPopoverController``` instances will never deallocated.

Adding ```__weak``` attribute to ```inView``` ivar can lead to crashes when popover is still presented but ```inView``` is already deallocated,
So it seems that solution to breaking retain cycle is to assign ```inView = nil``` in
```-(void)dismissPopover``` method.

Thanks!