def close(self):
if self._ptr:<EOL><INDENT>try:<EOL><INDENT>_bfd.close(self._ptr)<EOL><DEDENT>except TypeError as err:<EOL><INDENT>raise BfdException("<STR_LIT>" % err)<EOL><DEDENT>finally:<EOL><INDENT>self._ptr = None<EOL><DEDENT><DEDENT>
Close any existing BFD structure before open a new one.