Java 源码剖析——彻底搞懂Reference 和ReferenceQueue链滴 Java 源码剖析——彻底搞懂 Reference 和 ReferenceQueue 作者:jesministrator 原文链接:https://ld246.com/article/1513083921948 来源网站:链滴 许可协议:署名-相同方式共享 4.0 国际 (CC BY-SA 4.0) 之前博主的一篇读书笔记——《深入理解Java虚拟机》系列之回收对象算法与四种引用类型博客中为 的原理进行更深入 了解。因此博主查看了抽象父类Reference和负责注册引用对象的引用队列ReferenceQueue的源码 在此和大家一起分享,并做了一些分析,感兴趣的同学可以一起学习。 Reference源码分析 首先我们先看一下Reference类的注释: /** * Abstract base class for reference objects. This class defines defines the * operations common to all reference objects. Because reference objects are * implemented in close cooperation with the garbage collector, this class may * not be subclassed directly. 引0 码力 | 6 页 | 283.24 KB | 1 年前3
Apache Shiro 1.2.x Reference Manual 中文翻译V. Integration 整合 15. Spring Framework 16. Guice 17. CAS VI. Tools 工具 Apache Shiro 1.2.x Reference Manual 中文翻译 2 6.1 7 7.1 8 8.1 8.2 8.3 8.4 8.5 18. Command Line Hasher VII. Index 目录 Cryptography Features 加密功能 Apache Shiro 1.2.x Reference Manual 中文翻译 3 apache-shiro-1.2.x-reference Chinese translation of Apache Shiro 1.2.x Reference Manual and the other article collection. The laset demos of the reference at https://github.com/waylau/apache-shiro-1.2.x-reference-demos.There is also a GitBook version of the book: http://waylau.gitbooks.io/apache-shiro-1-2-x-reference or http://www0 码力 | 196 页 | 2.34 MB | 1 年前3
Blender v4.1 ManualBlender 4.1 Reference Manual Welcome to the manual for Blender, the free and open source 3D creation suite. Getting Started Getting Started About Blender Installing Blender Configuring Blender Help Blender after a few hours of practice. This manual is a good start, though it serves more as a reference. There are also many online video tutorials from specialized websites. Despite everything Blender and usually not highly experimental. Note Blender’s source code is available for free to either reference or to Build from Source. While normal users are not expected to compile Blender, it does have advantages:0 码力 | 6263 页 | 303.71 MB | 1 年前3
Apache ShardingSphere v5.5.0 documentRunning the test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 12 Reference 520 12.1 Database Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pagination Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 x Batch Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 Rewriting for Optimization ShardingSphere document ShardingSphere-JDBC ShardingSphere-Proxy Database Any MySQL/PostgreSQL Connections Count Cost More Less Heterogeneous language Java Only Any Performance Low loss Relatively High loss Decentralization0 码力 | 602 页 | 3.85 MB | 1 年前3
从零蛋开始学 Rustmark:isize = 10; let count:usize = 30; println!("result value is {}",result); println!("sum is {} and age is {}",sum,age); println!("mark is {} and count is {}",mark,count); } result value value is 10 sum is -10 and age is 20 mark is 10 and count is 30 fn main() { let age:u32 = 20.0; } error[E0308]: mismatched types --> src/main.rs:2:18 | 2 | let age:u32 = 20.0; | -> &str ����������� split_whitespace() pub fn split_whitespace(&self) -> SplitWhitespace ����������������� ��� split() pub fn split<'a, P>(&'a self, pat: P) -> Split<'a, P> �����������������0 码力 | 168 页 | 1.24 MB | 1 年前3
Rust 程序设计语言简体中文版0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/ reference/manifest.html [dependencies] 示例 1-2: cargo new 命令生成的 Cargo.toml 的内容 这个文件使用 TOML (Tom’s Obvious 0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/ reference/manifest.html [dependencies] 正如第一章那样,cargo new 生成了一个 “Hello, world!” 程序。查看 src/main.rs 文件: 文件名:src/main 都将其追加(不会覆 盖其原有内容)到一个字符串中,因此它需要字符串作为参数。这个字符串参数应该是可变 的,以便 read_line 将用户输入附加上去。 & 表示这个参数是一个 引用(reference),它允许多处代码访问同一处数据,而无需在内存中 多次拷贝。引用是一个复杂的特性,Rust 的一个主要优势就是安全而简单的操纵引用。完成 当前程序并不需要了解如此多细节。现在,我们只需知道它像变量一样,默认是不可变的。因0 码力 | 600 页 | 12.99 MB | 1 年前3
Kotlin 1.9.10 官方文档 中文版
main() { // 读取输入 val n = readln().toInt() val s = readln() val fl = readln().split(" ").map { it.toInt() } // 定义局部函数 f fun f(c: Char) = '0' + fl[c - '1'] // 贪婪查找第一个与最后一个索引 // 读取输入 val n = readLine()!!.toInt() val s = readLine()!! val fl = readLine()!!.split(" ").map { it.toInt() } // 定义局部函数 f fun f(c: Char) = '0' + fl[c - '1'] // 贪婪查找第一个与最后一个索引 // 一行字符串 private fun readInt() = readStr().toInt() // 单个整数 private fun readStrings() = readStr().split(" ") // 字符串列表 private fun readInts() = readStrings().map { it.toInt() } // 整数列表 【早期版本】 private0 码力 | 3753 页 | 29.69 MB | 1 年前3
Blender v3.2 参考手册(简体中文版)版,且通常并⾮⾼度试验性质,但由于未同稳定发⾏版⼀样经过完整测 试,可能会崩溃。 Note Blender's source code is available for free to either reference or to Build from Source. While normal users are not expected to compile Blender, it does have advantages: ⽤户可能需要在Blender内部获取⼯具或界⾯内容的相关帮助。 Use the keyboard shortcut or context menu item to visit pages of this reference manual from within Blender. This opens a web page relating to the button under the cursor, supporting down LMB will activate splitting or joining. Dragging from an area corner inward will split the area. You define the split direction by dragging either horizontally or vertically. Properties is being joined0 码力 | 4448 页 | 258.34 MB | 1 年前3
Kotlin 官方文档中文版 v1.9main() { // 读取输入 val n = readln().toInt() val s = readln() val fl = readln().split(" ").map { it.toInt() } // 定义局部函数 f fun f(c: Char) = '0' + fl[c - '1'] // 贪婪查找第一个与最后一个索引 // 读取输入 val n = readLine()!!.toInt() val s = readLine()!! val fl = readLine()!!.split(" ").map { it.toInt() } // 定义局部函数 f fun f(c: Char) = '0' + fl[c - '1'] // 贪婪查找第一个与最后一个索引 // 一行字符串 private fun readInt() = readStr().toInt() // 单个整数 private fun readStrings() = readStr().split(" ") // 字符串列表 private fun readInts() = readStrings().map { it.toInt() } // 整数列表 【早期版本】 private0 码力 | 2049 页 | 45.06 MB | 1 年前3
Rust算法教程 The Algos (algorithms)place = 1; while place <= max { let digit_of = |x| x as usize / place % radix; // Count digit occurrences let mut counter = vec![0; radix]; for &x in arr.iter() { val_current; } } let mut count_sublist = values.len() / 2; // makes gap as long as half of the array while count_sublist > 0 { for pos_start in 0..count_sublist { insertion(values insertion(values, pos_start, count_sublist); } count_sublist /= 2; // makes gap as half of previous } } #[cfg(test)] mod test { use super::shell_sort; #[test] fn basic() {0 码力 | 270 页 | 8.46 MB | 1 年前3
共 658 条
- 1
- 2
- 3
- 4
- 5
- 6
- 66













