Clear details on Java collection ‘Clear()’ API
Several of us might be familiar with the clear() API in Java collections framework. In this video, let's discuss what is the purpose of this clear() API? What are its surprising performance impacts? What happens under the JVM when this API is invoked? If you liked this video, you'll love our Java Performance Masterclass. Learn more: https://ycrash.io/java-performance-training - - - - - - - - - - - - - - - Topics covered: 00:45 - Creating ArrayList example 04:38 - List#clear() API example 08:33 - Assigning List to null example - - - - - - - - - - - - - - - Links shared in the blog: clear () API: https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Collection.htm #clear() Open source yCrash script: https://github.com/ycrash/yc-data-script HeapHero: https://heaphero.io/ Report generated by the HeapHero tool for List#clear() API example: https://heaphero.io/heap-report-wc.jsp?p=QWl3b0w1ZHJLK0lpOTIvN3ErUkw0VWwrb2M4WU5qcmMwTVRjZlJBT3VRTzIwRkhOMkpSMVZDYTU5Q0dpejVhV1picWcxdUZmQ1JrY3dEVC9uc29KcGc9PQ== - - - - - - - - - - - - - - - Read more in this blog: https://blog.ycrash.io/2023/02/18/clear-details-on-java-collection-clear-api/ - - - - - - - - - - - - - - - Our Tools: yCrash: https://ycrash.io/ GCeasy: https://gceasy.io/ HeapHero: https://heaphero.io/ fastThread Tool: https://fastthread.io/ - - - - - - - - - - - - - - - SRE Community: Need help in troubleshooting your performance problems? Post here: https://answers.ycrash.io/ - - - - - - - - - - - - - - - Follow us on: LinkedIn: https://www.linkedin.com/company/ycrash Instagram: https://www.instagram.com/ycrash_rca/ Facebook: https://www.facebook.com/tier1app Twitter: https://twitter.com/tier1app - - - - - - - - - - - - - - - Related video: Known Java APIs, Unknown Performance impact! https://youtu.be/pBiaSYsQF2k - - - - - - - - - - - - - - - javacollectioninterviewquestions | #javacollectioninterviewquestionsandanswers | #rubyonrailsjsonapiangular2 | #learnautomationonline | #learnapitestingintamil | #rubyonrails | #learnapiautomationfromscratch | #cleancode | #learnpython | #learnspringboot | #handsonspringbootcourse | #learnspringboottutorial | #javafullstackproject | #reactcontrolledinputs | #deletemultiplerecords | #connectrailsplusangular2 | #javafullstackdevelopercourse
Several of us might be familiar with the clear() API in Java collections framework. In this video, let's discuss what is the purpose of this clear() API? What are its surprising performance impacts? What happens under the JVM when this API is invoked? If you liked this video, you'll love our Java Performance Masterclass. Learn more: https://ycrash.io/java-performance-training - - - - - - - - - - - - - - - Topics covered: 00:45 - Creating ArrayList example 04:38 - List#clear() API example 08:33 - Assigning List to null example - - - - - - - - - - - - - - - Links shared in the blog: clear () API: https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Collection.htm #clear() Open source yCrash script: https://github.com/ycrash/yc-data-script HeapHero: https://heaphero.io/ Report generated by the HeapHero tool for List#clear() API example: https://heaphero.io/heap-report-wc.jsp?p=QWl3b0w1ZHJLK0lpOTIvN3ErUkw0VWwrb2M4WU5qcmMwTVRjZlJBT3VRTzIwRkhOMkpSMVZDYTU5Q0dpejVhV1picWcxdUZmQ1JrY3dEVC9uc29KcGc9PQ== - - - - - - - - - - - - - - - Read more in this blog: https://blog.ycrash.io/2023/02/18/clear-details-on-java-collection-clear-api/ - - - - - - - - - - - - - - - Our Tools: yCrash: https://ycrash.io/ GCeasy: https://gceasy.io/ HeapHero: https://heaphero.io/ fastThread Tool: https://fastthread.io/ - - - - - - - - - - - - - - - SRE Community: Need help in troubleshooting your performance problems? Post here: https://answers.ycrash.io/ - - - - - - - - - - - - - - - Follow us on: LinkedIn: https://www.linkedin.com/company/ycrash Instagram: https://www.instagram.com/ycrash_rca/ Facebook: https://www.facebook.com/tier1app Twitter: https://twitter.com/tier1app - - - - - - - - - - - - - - - Related video: Known Java APIs, Unknown Performance impact! https://youtu.be/pBiaSYsQF2k - - - - - - - - - - - - - - - javacollectioninterviewquestions | #javacollectioninterviewquestionsandanswers | #rubyonrailsjsonapiangular2 | #learnautomationonline | #learnapitestingintamil | #rubyonrails | #learnapiautomationfromscratch | #cleancode | #learnpython | #learnspringboot | #handsonspringbootcourse | #learnspringboottutorial | #javafullstackproject | #reactcontrolledinputs | #deletemultiplerecords | #connectrailsplusangular2 | #javafullstackdevelopercourse