 Modern C++ Tutorial: C++11/14/17/20 On the Fly. . . . . . . . . . . . . . . . . . . . . 57 Chapter 05 Smart Pointers and Memory Management 57 5.1 RAII and Reference Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 other methods that we can implement on our own. Chapter 05 Smart Pointers and Memory Management 5.1 RAII and Reference Counting Programmers who understand Objective-C/Swift/JavaScript should know the class A; 60 5.4 std::weak_ptr CHAPTER 05 SMART POINTERS AND MEMORY MANAGEMENT Figure 2: Figure 5.1 class B; class A { public: std::shared_ptr pointer; ~A() { std::cout << "A was destroyed"0 码力 | 92 页 | 1.79 MB | 1 年前3 Modern C++ Tutorial: C++11/14/17/20 On the Fly. . . . . . . . . . . . . . . . . . . . . 57 Chapter 05 Smart Pointers and Memory Management 57 5.1 RAII and Reference Counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 other methods that we can implement on our own. Chapter 05 Smart Pointers and Memory Management 5.1 RAII and Reference Counting Programmers who understand Objective-C/Swift/JavaScript should know the class A; 60 5.4 std::weak_ptr CHAPTER 05 SMART POINTERS AND MEMORY MANAGEMENT Figure 2: Figure 5.1 class B; class A { public: std::shared_ptr pointer; ~A() { std::cout << "A was destroyed"0 码力 | 92 页 | 1.79 MB | 1 年前3
 Conan 1.18 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 584 页 | 4.80 MB | 1 年前3 Conan 1.18 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 584 页 | 4.80 MB | 1 年前3
 Conan 1.19 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 609 页 | 4.88 MB | 1 年前3 Conan 1.19 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 609 页 | 4.88 MB | 1 年前3
 Conan 1.20 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 611 页 | 4.89 MB | 1 年前3 Conan 1.20 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 611 页 | 4.89 MB | 1 年前3
 Conan 1.16 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting Started conan Documentation, Release 1.16.1 Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 545 页 | 4.34 MB | 1 年前3 Conan 1.16 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting Started conan Documentation, Release 1.16.1 Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 545 页 | 4.34 MB | 1 年前3
 Conan 1.21 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 621 页 | 4.92 MB | 1 年前3 Conan 1.21 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 621 页 | 4.92 MB | 1 年前3
 Conan 1.22 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 629 页 | 4.98 MB | 1 年前3 Conan 1.22 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 629 页 | 4.98 MB | 1 年前3
 Conan 1.23 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 637 页 | 5.04 MB | 1 年前3 Conan 1.23 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dependencies and generate the information for the build system: Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 637 页 | 5.04 MB | 1 年前3
 现代C++ 教程:高速上手C++11/14/17/20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 第 5 章智能指针与内存管理 52 5.1 RAII 与引用计数 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 可以根据实际场景丰富的选择需要使用的容器,从而获得更好的性能。 std::tuple 虽然有效,但是标准库提供的功能有限,没办法满足运行期索引和迭代的需求,好在我 们还有其他的方法可以自行实现。 第 5 章智能指针与内存管理 5.1 RAII 与引用计数 了解 Objective-C/Swift 的程序员应该知道引用计数的概念。引用计数这种计数是为了防止内存泄 露而产生的。基本想法是对于动态分配的对象,进行引用计数,每当增加一次对同一个对象的引用,那 pointer; ~A() { std::cout << "A 被销毁" << std::endl; 55 5.4 std::weak_ptr 第 5 章智能指针与内存管理 图 2: 图 5.1 } }; struct B { std::shared_ptr pointer; ~B() { std::cout << "B 被销毁" << std::endl; } };0 码力 | 83 页 | 2.42 MB | 1 年前3 现代C++ 教程:高速上手C++11/14/17/20. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 第 5 章智能指针与内存管理 52 5.1 RAII 与引用计数 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 可以根据实际场景丰富的选择需要使用的容器,从而获得更好的性能。 std::tuple 虽然有效,但是标准库提供的功能有限,没办法满足运行期索引和迭代的需求,好在我 们还有其他的方法可以自行实现。 第 5 章智能指针与内存管理 5.1 RAII 与引用计数 了解 Objective-C/Swift 的程序员应该知道引用计数的概念。引用计数这种计数是为了防止内存泄 露而产生的。基本想法是对于动态分配的对象,进行引用计数,每当增加一次对同一个对象的引用,那 pointer; ~A() { std::cout << "A 被销毁" << std::endl; 55 5.4 std::weak_ptr 第 5 章智能指针与内存管理 图 2: 图 5.1 } }; struct B { std::shared_ptr pointer; ~B() { std::cout << "B 被销毁" << std::endl; } };0 码力 | 83 页 | 2.42 MB | 1 年前3
 Conan 1.15 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting Started conan Documentation, Release 1.15.1 Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 540 页 | 4.22 MB | 1 年前3 Conan 1.15 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 Creating Packages 31 5.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Getting Started conan Documentation, Release 1.15.1 Important: If you are using GCC compiler >= 5.1, Conan will set the compiler.libcxx to the old ABI for backwards compatibility. You can change this CHAPTER FIVE CREATING PACKAGES This section shows how to create, build and test your packages. 5.1 Getting Started To start learning about creating packages, we will create a package from the existing0 码力 | 540 页 | 4.22 MB | 1 年前3
共 91 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10













