# cpp-smart-ptr **Repository Path**: cpp-thinkmore/cpp-smart-ptr ## Basic Information - **Project Name**: cpp-smart-ptr - **Description**: 了解c++智能指针基本原理,并手动实现进行模拟。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-02 - **Last Updated**: 2026-01-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README This project aims to provide a simple implementation of smart pointers for C++ development. It includes basic functionality of `shared_ptr` and `unique_ptr`, helping manage dynamically allocated objects and prevent memory leaks. ## Installation Ensure you have a C++ compiler and CMake installed. Clone this repository to your local machine: ```bash git clone https://gitee.com/cpp-thinkmore/cpp-smart-ptr.git cd cpp-smart-ptr ``` Build the project using CMake: ```bash mkdir build cd build cmake .. make ``` ## Usage The project provides implementations of smart pointers. You can find `shared_ptr.hpp` and `unique_ptr.hpp` in the `include/smart_ptr` directory. Include these header files in your C++ code to use the smart pointer features. See the example code in `src/main.cpp`. ## Contribution Contributions of code or suggestions to improve this project are welcome. Please submit a Pull Request or Issue on Gitee. ## License This project is licensed under the MIT License. See the LICENSE file in the repository for details.