Skip to content

Commit

Permalink
Free the alloc memory
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Jul 15, 2024
1 parent 2e24a6d commit 2239ba5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Image/ImageDrawing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ extension KingfisherWrapper where Base: KFCrossPlatformImage {
var inBuffer = vImage_Buffer(data: inData, height: height, width: width, rowBytes: rowBytes)

let outData = malloc(cgImage.bytesPerRow * cgImage.height)
defer { free(outData) }
var outBuffer = vImage_Buffer(data: outData, height: height, width: width, rowBytes: rowBytes)

for _ in 0 ..< iterations {
Expand Down

0 comments on commit 2239ba5

Please sign in to comment.