release resources after parse