Skip to content

Commit

Permalink
set delegate and datasource to nil when deinit
Browse files Browse the repository at this point in the history
  • Loading branch information
nghialv committed Jan 22, 2016
1 parent 0a4333f commit ea46712
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Hakuba.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public class Hakuba : NSObject {
tableView.dataSource = self
}

deinit {
tableView?.delegate = nil
tableView?.dataSource = nil
}

public func deselectAllCells() {
for cell in selectedCells {
if let cellmodel = (cell as? MYTableViewCell)?.cellModel {
Expand Down

0 comments on commit ea46712

Please sign in to comment.