Skip to content

Commit

Permalink
Resolve strong cycle issues
Browse files Browse the repository at this point in the history
- Closes #3
  • Loading branch information
Reda Lemeden committed Nov 25, 2014
1 parent 348f063 commit 7f4cfa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/ImageScout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ImageScout {
if let unwrappedURL = NSURL(string: URI) {
let operation = ScoutOperation(task: session.dataTaskWithURL(unwrappedURL))

operation.completionBlock = {
operation.completionBlock = { [unowned self] in
completion(operation.error, operation.size, operation.type)
self.operations[URI] = nil
}
Expand Down Expand Up @@ -83,7 +83,7 @@ class ImageScout {
// MARK: - Delegate

private class SessionDelegate: NSObject, NSURLSessionDataDelegate {
var scout: ImageScout?
weak var scout: ImageScout?

private func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) {
if let unwrappedScout = scout {
Expand Down

0 comments on commit 7f4cfa7

Please sign in to comment.