Skip to content

Instantly share code, notes, and snippets.

@jacobsapps
Created April 30, 2025 21:35
Show Gist options
  • Save jacobsapps/074cb87ac3d0a02fd56333362a4a979c to your computer and use it in GitHub Desktop.
Save jacobsapps/074cb87ac3d0a02fd56333362a4a979c to your computer and use it in GitHub Desktop.
private func loadImages() {
let urls = (0..<50_000).compactMap { _ in
Bundle.main.url(forResource: "monalisa", withExtension: "jpg")
}
for url in urls {
autoreleasepool {
if let data = try? Data(contentsOf: url),
let image = UIImage(data: data) {
print(image.size)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment