Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created April 24, 2018 14:07
Show Gist options
  • Save vialyx/accde9621f5eceec89d7fb4584142376 to your computer and use it in GitHub Desktop.
Save vialyx/accde9621f5eceec89d7fb4584142376 to your computer and use it in GitHub Desktop.
// MARK: - Autorelease pool
// Reduce device memory usage
for i in 0...1000 {
autoreleasepool {
let image = UIImage(named: "\(i)")
print("image: \(image?.size)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment