- Hands-On Design Patterns with Kotlin
- Alexey Soshin
- 61字
- 2021-06-25 20:49:28
Caching
The Static Factory Method may provide caching, as Long actually does. Instead of always returning a new instance for any value, valueOf() checks in-cache whether this value was already parsed. If it is, it returns a cached instance. Repeatedly calling the Static Factory Method with the same values may produce less garbage for collection than using constructors all the time.
推薦閱讀
- 軟件項目管理(第2版)
- jQuery從入門到精通 (軟件開發視頻大講堂)
- 匯編語言程序設計(第3版)
- Mastering KnockoutJS
- Ext JS 4 Web Application Development Cookbook
- Learning Vaadin 7(Second Edition)
- Internet of Things with ESP8266
- 寫給程序員的Python教程
- Maker基地嘉年華:玩轉樂動魔盒學Scratch
- Getting Started with React VR
- ROS機器人編程實戰
- C# 7.1 and .NET Core 2.0:Modern Cross-Platform Development(Third Edition)
- Monitoring Docker
- 信息學奧林匹克競賽初賽精講精練
- Game Development Patterns and Best Practices