Trial: Improve memory handling ...
Fix the tests
Merge pull request #1435 from benallard/patch-1

Trial: Improve memory handling ...