-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
Rvalue and move semantics should be considered a viable part of programming Hotspot. These concepts allow us to not only write more performant code but also more correct code. An example of the latter is when a class needs unique ownership of its dynamically allocated resources and so has removed its copy assignment/constructor but it needs to be moved. In today's Hotspot this has to be expressed in a roundabout way which is prone to bugs, such as having a method that generates a copy which must not be accidentally misused. Move semantics solve these issues.
- relates to
-
JDK-8301373 Potential use after free in GrowableArray
-
- Open
-
- links to
-
Review openjdk/jdk/15386