Skip to content

Instantly share code, notes, and snippets.

@chethann
Last active November 29, 2016 15:12
Show Gist options
  • Save chethann/586bde967d651060215a9e965ed5969e to your computer and use it in GitHub Desktop.
Save chethann/586bde967d651060215a9e965ed5969e to your computer and use it in GitHub Desktop.
Iterator<Map.Entry<String, CloseableReference<CloseableImage>>> entries = imageRefMap.entrySet().iterator();
while (entries.hasNext()) {
Map.Entry<String, CloseableReference<CloseableImage>> entry = entries.next();
CloseableReference<CloseableImage> closeableRef = entry.getValue();
if(closeableRef != null){
closeableRef.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment