I am using TensorFlow with C interface. Documentaion of TF_SessionRun function states: "On success, the tensors corresponding to outputs[0,noutputs-1] are placed in output_values[]. Ownership of the elements of output_values[] is transferred to the caller, which must eventually call TF_DeleteTensor on them."
I am using TF_SessionRun large amount of times and I would like to minimize amount of memory reallocations. But this description says nothing about the rules of memory reallocation. If output TF_Tensor is already allocated with proper dimensions, will it be reallocated or used as is? Can this behaviour change in the future?