assert (model != nullptr);
assert (segt != nullptr);
+ output_buffers default_output = {0};
output_buffers *output = req->getOutputBuffers ();
/* user didn't provide valid output buffers. So, pass internally allocated one */
- if (output == nullptr) {
- output = new output_buffers;
- memset (output, '\x00', sizeof (output_buffers));
- }
+ if (output == nullptr)
+ output = &default_output;
if (output->num_buffers == 0)
output->num_buffers = segt->getNumOutputSegments ();
}
cb (output, req->getID (), cb_data);
-
- if (req->getOutputBuffers () != output)
- delete output;
}
int