5月份的技术总结

一、关于构造函数、智能指针和引用计数的一些思考

  1.当有一些类的内存资源是共享的时候请使用智能指针或者引用计数实现

  2.有些类的构造函数和西沟函数应该禁止掉,通过公用接口申请和释放资源

二、字节的对齐问题

  链接:http://blog.csdn.net/arethe/article/details/2548867 、http://blog.csdn.net/haiwil/article/details/7070593

三、operator delete的具体用法

  operator delete is a regular function that can be called explicitly just as any other function. But in C++, delete is an operator with a very specific behavior: An expression with the delete operator, first calls the appropriate destructor (for class types), and then calls a deallocation function.

  链接:http://www.cplusplus.com/reference/new/operator%20delete/?kw=operator%20delete

  

爱上一匹野马,可是我家里没有草原o(╯□╰)o
原文地址:https://www.cnblogs.com/yemajun/p/5587850.html