Skip to content

Commit

Permalink
re-define delegate as weak
Browse files Browse the repository at this point in the history
  • Loading branch information
Leslie Nadeau committed Dec 13, 2015
1 parent edee578 commit b4d4a4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Source/Player.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public enum BufferingState: Int, CustomStringConvertible {
}
}

public protocol PlayerDelegate {
public protocol PlayerDelegate: class {
func playerReady(player: Player)
func playerPlaybackStateDidChange(player: Player)
func playerBufferingStateDidChange(player: Player)
Expand Down Expand Up @@ -106,7 +106,7 @@ private let PlayerReadyForDisplay = "readyForDisplay"

public class Player: UIViewController {

public var delegate: PlayerDelegate!
public weak var delegate: PlayerDelegate!

public func setUrl(url: NSURL) {
// Make sure everything is reset beforehand
Expand Down

0 comments on commit b4d4a4a

Please sign in to comment.