Memory management for all three backends

- Fixes #8