2 ms·
Of course, in C++ the need for such constructs is reduced due to RAII and scoping running destructors automatically. This is useful when you need to interact wi
by saagarjha 7y ago
Of course, in C++ the need for such constructs is reduced due to RAII and scoping running destructors automatically. This is useful when you need to interact with C libraries that you don’t want to wrap in C++ (and when I was doing something like this in the past, I rolled my own as well).
- dgellow 7y ago> This is useful when you need to interact with C libraries that you don’t want to wrap in C++ Yep! I really like the defer pattern for those situations :)