memory management in output filter