![]() |
|
#2
|
||||
|
||||
|
You can also do something similar to this by using the built-in 'std::shared_ptr' type. It allows for initialization with a custom deleter function. With that, you can pass a type cleanup call for types that have one. (You can also just define your own callback to cleanup custom/more unique types as needed.)
For example, using a 'HANDLE' type, which is cleaned up using 'CloseHandle': PHP Code:
__________________
Personal Projects Site: https://atom0s.com Last edited by atom0s; 06-08-2024 at 04:49. Reason: Forum breaks C++ code using the normal code tags; changed to php tags instead. |
| The Following 3 Users Say Thank You to atom0s For This Useful Post: | ||
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Resource Manager (.NET) v2 | CodeCracker | Community Tools | 2 | 11-23-2025 22:25 |