Trial: Improve memory handling ...

I was thinking about the change that was introduced in #1436