Unsubscribe from buffer when destroyed

This commit is contained in:
Kevin Sawicki 2013-10-14 17:23:53 -07:00
parent 1c357f9b65
commit 03964ff568

View File

@ -80,6 +80,7 @@ class Git
@getPathStatus(path)
@subscribe buffer, 'saved', bufferStatusHandler
@subscribe buffer, 'reloaded', bufferStatusHandler
@subscribe buffer, 'destroyed', => @unsubscribe(buffer)
# Public: Destroy this `Git` object. This destroys any tasks and
# subscriptions and releases the underlying libgit2 repository handle.