Leveraging Lambda Expressions for Lazy Evaluation in Java - DZone Java
GCing an Unused Supplier
As some of you have probably already noticed, after the value gets evaluated, a supplier will never be used again, but it still occupies some resources.
The way to handle that would be to make the Supplier non-final and free it by setting it to a null after our value gets evaluated.
Read full article from Leveraging Lambda Expressions for Lazy Evaluation in Java - DZone Java
No comments:
Post a Comment