Parser memory releasing and lexer mem-leak fix.