I am going through the ONNX C++ sample and I noticed that some heap memory is allocated for the ONNX configuration:
nvonnxparser::IOnnxConfig* config = nvonnxparser::createONNXConfig();
config does not have the usual
destroy() method. Besides, the destructor of IOnnxConfig is protected virtual, so we cannot simply
delete the config.
Is this intentional? The sample, as provided, would then have a memory leak since the config is not destroyed in any way (checked with Valgrind).