use a proper queue length
fix a memory leak
Merge pull request #704 from vrabaud/hydro-devel

fix a memory leak