By default unique_ptr will call delete on the given type if an array qualifier isn't present, not delete[]. It's important to explicitly specify an array is being handled.