Skip to content

Commit

Permalink
Fixes an issue where UnsafeMutablePointer is not released properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Kneale committed Jul 9, 2015
1 parent 4c24ab3 commit e0c26f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Kingfisher/String+MD5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class HashBase {
var bufZeros = UnsafeMutablePointer<UInt8>(calloc(counter, sizeof(UInt8)))
tmpMessage.appendBytes(bufZeros, length: counter)

bufZeros.destroy()
bufZeros.dealloc(1)
bufZeros = nil

return tmpMessage
}
}
Expand Down

0 comments on commit e0c26f4

Please sign in to comment.