Fix visualisation memory leaks
Merge branch 'master' into data_beta