Code review comment for lp:~pete-woods/unity-api/add-glib-assigner-class

Revision history for this message
Pete Woods (pete-woods) wrote :

James, FYI doing the reset causes the deleter function to become invalid as far as I can tell. I don't quite understand this myself.

If you do e.g.:

unique_ptr<Foo, MyDeleter> o(nullptr, MyDeleter());
o.reset(new_foo()); // unique_ptr doesn't let you pass the deleter again here, presumably intentionally.

then unique_ptr causes a segfault on destruction.

« Back to merge proposal