The code I'm developing tries to avoid handling bare pointers, but I want to add some event based functinalities to it - I would use smart pointers here too, but as I understand it, this would mean that event_base will be deleted using delete operator instead of event_base_free, as in all examples I've seen so far. Is this safe? Can I just use unique_ptr(event_base_new()) and not worry about it?
Asked
Active
Viewed 195 times
1 Answers
4
std::unique_ptr allows you to specify a deleter, so you can find a way to use your event_base_
deletion mechanism.

juanchopanza
- 223,364
- 34
- 402
- 480