cudafree question

is there simple way to free entire struct using cudafree or cudafreehost etc?
eg

{
*a,*b,*c
}test

test sample
cudafree(&sample);

if a, b, c are same type,

for ( auto p : { a, b, c } ) cudaFree(p);