rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

Remove strongly held target from kvo targets hash #400

Closed jsteinberg closed 10 years ago

jsteinberg commented 10 years ago

This issue seems to also be resolved in this PR(https://github.com/rubymotion/BubbleWrap/pull/361), but has not been merged in yet. This PR resolves only the issue I ran into. I think keeping a strong reference in @targets is okay, as long as it is removed when no longer needed. The way it currently is, the target object will only be released when the observing object is also released(releasing @targets)

clayallsopp commented 10 years ago

Ah very nice work, and appreciate the specs too! Thanks!

And a heads up, please try to keep the whitespace diffs out for future PRs :)

markrickert commented 10 years ago

re: whitespace diffs... but look at how many bytes he removed! :)

I'm a big fan of auto whitespace truncation in your text editor, so my PRs might have things like this too without even realizing it.

jsteinberg commented 10 years ago

Yeah, sorry about the whitespace. I noticed it after I submitted the PR and didn't think it warranted canceling and then opening a new one.