Skip to content

Commit

Permalink
Mark final to improve performance (if any)
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Dec 27, 2017
1 parent 01fd98f commit 0fb7b4d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/Image.swift
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ extension Kingfisher where Base: Image {
}

/// Reference the source image reference
class ImageSource {
final class ImageSource {
var imageRef: CGImageSource?
init(ref: CGImageSource) {
self.imageRef = ref
Expand Down
2 changes: 1 addition & 1 deletion Sources/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ extension ImageDownloader {
/// If we use `ImageDownloader` as the session delegate, it will not be released.
/// So we need an additional handler to break the retain cycle.
// See https://github.com/onevcat/Kingfisher/issues/235
class ImageDownloaderSessionHandler: NSObject, URLSessionDataDelegate, AuthenticationChallengeResponsable {
final class ImageDownloaderSessionHandler: NSObject, URLSessionDataDelegate, AuthenticationChallengeResponsable {

// The holder will keep downloader not released while a data task is being executed.
// It will be set when the task started, and reset when the task finished.
Expand Down
4 changes: 2 additions & 2 deletions Sources/Indicator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extension Indicator {

// MARK: - ActivityIndicator
// Displays a NSProgressIndicator / UIActivityIndicatorView
class ActivityIndicator: Indicator {
final class ActivityIndicator: Indicator {

#if os(macOS)
private let activityIndicatorView: NSProgressIndicator
Expand Down Expand Up @@ -143,7 +143,7 @@ class ActivityIndicator: Indicator {

// MARK: - ImageIndicator
// Displays an ImageView. Supports gif
class ImageIndicator: Indicator {
final class ImageIndicator: Indicator {
private let animatedImageIndicatorView: ImageView

var view: IndicatorView {
Expand Down
2 changes: 1 addition & 1 deletion Sources/KingfisherManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public typealias CompletionHandler = ((_ image: Image?, _ error: NSError?, _ cac

/// RetrieveImageTask represents a task of image retrieving process.
/// It contains an async task of getting image from disk and from network.
public class RetrieveImageTask {
public final class RetrieveImageTask {

public static let empty = RetrieveImageTask()

Expand Down

0 comments on commit 0fb7b4d

Please sign in to comment.