A shared ptr and weak ptr implementation for C language.
- gcc or clang compiler (required)
- make (required)
用C模拟了boost的shared ptr与weak ptr,利用编译器的cleanup属性模拟C++ RAII.
make debug;
./a.out;
# 肉眼看下malloc free的输出是否配对...
weak and shared ptr for C.
A shared ptr and weak ptr implementation for C language.
用C模拟了boost的shared ptr与weak ptr,利用编译器的cleanup属性模拟C++ RAII.
make debug;
./a.out;
# 肉眼看下malloc free的输出是否配对...
weak and shared ptr for C.