Fix memory leak thanks f.camblor

A PR for branch "jaxrs-jersey" to fix memory leak,
https://github.com/binout/restangular/commit/4167057a52253e8ec946b59c6b747673461f98a1#commitcomment-3879288