Fix memory leaks, sizes for image generation
This commit is contained in:
@ -7,8 +7,8 @@ extension NSImage {
|
||||
guard self.size.width > size.width else {
|
||||
return self
|
||||
}
|
||||
return NSImage(size: size, flipped: false) { (resizedRect) -> Bool in
|
||||
self.draw(in: resizedRect)
|
||||
return NSImage(size: size, flipped: false) { [weak self] (resizedRect) -> Bool in
|
||||
self?.draw(in: resizedRect)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user