04 2021 档案

摘要:悬垂指针 // p1和p2指向同一个内存地址 char *p1 = new string(""); char *p2 = p1; // 在操作p2的时候,可能会将该内存删除(比如追加字符串的实现可能是这样的:) function string::push_str(string str) { stri 阅读全文
posted @ 2021-04-30 09:48 develon 阅读(110) 评论(0) 推荐(0) 编辑
摘要:std::thread use std::{thread::{self, JoinHandle, sleep}, time::Duration}; fn main() -> std::io::Result<()> { let jh: JoinHandle<i32> = thread::spawn(| 阅读全文
posted @ 2021-04-29 09:20 develon 阅读(173) 评论(0) 推荐(0) 编辑
摘要:&str与String &str代表不可变的字符切片&[u8]。 String是堆上的Vec,所以其本质是一个指针*const Vec<u8>。 &str ⇒ String let str: String = "abc".to_string(); let str: String = String:: 阅读全文
posted @ 2021-04-27 23:13 develon 阅读(206) 评论(0) 推荐(0) 编辑
摘要:Rust 异步编程 https://learnku.com/docs/async-book/2018 END 阅读全文
posted @ 2021-04-16 14:11 develon 阅读(57) 评论(0) 推荐(0) 编辑
摘要:CMakeLists.txt cmake_minimum_required(VERSION 3.0) project(a.out C) # 设置SRC变量,包含目录下的源文件,不包括子目录 aux_source_directory(src SRC) aux_source_directory(src/ 阅读全文
posted @ 2021-04-14 15:16 develon 阅读(3443) 评论(0) 推荐(0) 编辑
摘要:AnnotationBeanConfigurerAspect AnnotationBeanConfigurerAspect是一个AspectJ切面,使用AspectJ语言定义。 通过上下文获取该切面后,调用其实例方法configureBean(),可对一个使用new关键字创建的对象进行配置,实现自动 阅读全文
posted @ 2021-04-03 12:10 develon 阅读(696) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示