Force free memory
Merge pull request #1180 from nlegoff/fix-memory-issue

[3.8][PHRAS-308] Force free memory