08 2020 档案
摘要:在类的内部获得自己的shared_ptr这件事情是很难避免的,加了这个可以在现有this的计数上继续增加
阅读全文
摘要:了解到的工具有如下几个 memleak工具 用起来更方便 valgrind(最强大) mtrace(linux gnu自带,但是只能检测malloc和free) debug_new(针对c++,重载operator new,placement new实现的),原理地址https://www.ibm.
阅读全文
摘要:陈硕 (giantchen AT gmail) blog.csdn.net/Solstice 前几天我在新浪微博上出了两道有关 TCP 的思考题,引发了一场讨论 http://weibo.com/1701018393/eCuxDrta0Nn 。 第一道初级题目是: 有一台机器,它有一个 IP,上面运
阅读全文
摘要:在C++标准中,是这样描述的(在标准草案的6.7节中): such a variable is initialized the first time control passes through its declaration; such a variable is considered initi
阅读全文
摘要:动态规划的题,我先用最初级的方式写出来 class Solution { public: int rob(vector<int>& nums) { if(nums.size()==0) { return 0; } int n=nums.size(); if(n==1) { return nums[0
阅读全文
摘要:https://www.cnblogs.com/catch/p/3176636.html
阅读全文