CRAY - fix memory leak when using accelerators