5月份的技术总结

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

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

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

二、字节的对齐问题

  链接:http://blog.youkuaiyun.com/arethe/article/details/2548867 、http://blog.youkuaiyun.com/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

  

转载于:https://www.cnblogs.com/yemajun/p/5587850.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值