当前位置:网站首页>Smart pointer shared_ PTR and weak_ Difference of PTR
Smart pointer shared_ PTR and weak_ Difference of PTR
2022-07-05 03:26:00 【Alex1_ Code】
weak_ptr To solve the problem shared_ptr The problem of circular quotation , Prevent bidirectional binding
1. share_ptr Example
Schematic diagram
It can be seen that , When ptr_a,ptr_b Release , Did not lead to A,B The construction of class .
2. Right up there Example improvements :
Schematic diagram
At this time, both class objects are destructed , meanwhile ptr_a Of use_count by 2,ptr_b Of use_count by 1
边栏推荐
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- El tree whether leaf node or not, the drop-down button is permanent
- Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
- Use of kubesphere configuration set (configmap)
- Necessary fonts for designers
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Mongodb common commands
- C file in keil cannot be compiled
猜你喜欢
Spark SQL learning bullet 2
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
LeetCode146. LRU cache
El select, El option drop-down selection box
2. Common request methods
Single box check box
Yyds dry goods inventory intelligent fan based on CC2530 design
College Students' innovation project management system
Linux Installation redis
Ubantu disk expansion (VMware)
随机推荐
1.五层网络模型
Simple use of devtools
Pat class a 1160 forever (class B 1104 forever)
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Sqoop命令
qrcode:将文本生成二维码
Machine learning experiment report 1 - linear model, decision tree, neural network part
Acwing game 58 [End]
Ask, does this ADB MySQL support sqlserver?
Performance of calling delegates vs methods
Good documentation
Ubantu disk expansion (VMware)
Kuboard
端口,域名,协议。
This + closure + scope interview question
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
有個疑問 flink sql cdc 的話可以設置並行度麼, 並行度大於1會有順序問題吧?
Cette ADB MySQL prend - elle en charge SQL Server?
Sqoop command
SQL injection exercise -- sqli Labs