examples: ensure cleanup occurs before main ends.

Else the implicit context in the CUDA driver may destroy itself before the destructors for globals/statics run, and we could try to e.g. cudaFree without a valid context.

Merge request reports

Loading