Fix a few memory leaks. Fixes #120

3 jobs for memfix in 9 minutes and 30 seconds (queued for 15 seconds)
Status Job ID Name Coverage
  Test
passed #774413
ubuntu-16.04

00:02:44

passed #774414
ubuntu-18.04

00:02:35

passed #774415
ubuntu-18.04-no-backend

00:09:05