aleclarson / emitter-kit

Type-safe event handling for Swift
MIT License
567 stars 71 forks source link

Add @warn_unused_result on methods which return Listener Fix #27 #30

Closed phimage closed 8 years ago

phimage commented 8 years ago

Warn user of framework to keep a reference on Listener objects see #27

aleclarson commented 8 years ago

I don't think the once methods should be altered here.

Thanks for the PR. :smile:

phimage commented 8 years ago

for once it's not mandatory to keep a reference on the returned Listener? (I don't use it so never tested)

aleclarson commented 8 years ago

A Listener created with once is retained by the Event.

phimage commented 8 years ago

ok I create a new PR with only warning on "on" methods? (Commit in my branch to remove on once method will be bad for your git history ;) ) or I let you do it when you want do it

as you want

aleclarson commented 8 years ago

Fixed in 6402425! :smile: