Skip to content

Commit 2a6e9ce

Browse files
committed
PBHistorySearchController: remove KV-Observer on dealloc
1 parent ada10e5 commit 2a6e9ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Classes/Controllers/PBHistorySearchController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ - (void)awakeFromNib
132132
[commitController addObserver:self forKeyPath:@"arrangedObjects" options:0 context:kGitXSearchArrangedObjectsContext];
133133
}
134134

135+
- (void)dealloc {
136+
[commitController removeObserver:self forKeyPath:@"arrangedObjects" context:kGitXSearchArrangedObjectsContext];
137+
}
138+
135139
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
136140
{
137141
if ([(__bridge NSString *)context isEqualToString:kGitXSearchArrangedObjectsContext]) {

0 commit comments

Comments
 (0)