Java: Remove no-longer-true note about stateless lambdas
Bug: 952833 Change-Id: Ic091cb7cc1b0d619cd38f8e80de8201a66166f63 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2173084 Auto-Submit: Andrew Grieve <agrieve@chromium.org> Reviewed-by: Peter Conn <peconn@chromium.org> Commit-Queue: Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/heads/master@{#763818}
This commit is contained in:

committed by
Commit Bot

parent
48fdd0fb70
commit
ace8fe8521
@ -30,9 +30,6 @@ is encouraged, but there are some gotchas:
|
||||
|
||||
### Lambdas and Method References
|
||||
* These are syntactic sugar for creating anonymous inner classes.
|
||||
* Furthermore, stateless lambdas
|
||||
[become singletons](https://stackoverflow.com/questions/27524445/does-a-lambda-expression-create-an-object-on-the-heap-every-time-its-executed)
|
||||
and so do not result in new instances when used in loops.
|
||||
* Use them only where the cost of an extra class & method definition is
|
||||
justified.
|
||||
|
||||
|
Reference in New Issue
Block a user