Skip to content

Commit

Permalink
Fixed memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
patchthecode committed Mar 7, 2017
1 parent 3bc873c commit dfeae9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/JTAppleCalendarLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ open class JTAppleCalendarLayout: UICollectionViewLayout, JTAppleCalendarLayoutP
}
}

unowned var delegate: JTAppleCalendarDelegateProtocol
weak var delegate: JTAppleCalendarDelegateProtocol!
var currentHeader: (section: Int, size: CGSize)? // Tracks the current header size
var currentCell: (section: Int, itemSize: CGSize)? // Tracks the current cell size
var contentHeight: CGFloat = 0 // Content height of calendarView
Expand All @@ -57,8 +57,8 @@ open class JTAppleCalendarLayout: UICollectionViewLayout, JTAppleCalendarLayoutP
var daysInSection: [Int: Int] = [:] // temporary caching

init(withDelegate delegates: JTAppleCalendarDelegateProtocol) {
delegate = delegates
super.init()
delegate = delegates

}

Expand Down

0 comments on commit dfeae9a

Please sign in to comment.