junlon2006 / cpp-feature

c++11 feature etc.
Apache License 2.0
0 stars 1 forks source link

RAII技术 #4

Open junlon2006 opened 4 years ago

junlon2006 commented 4 years ago

RAII的主要思路:从类的构造函数中分配资源,在析构函数中释放资源 如std::lock_guard