에디터에 리소스를 해제하는 함수입니다.

에디터에 이벤트와 참조를 제거하여 메모리 누수를 방지합니다.

onBeforeUnload 실행 시 destroy가 실행됩니다.



Example:

// react 예제

useEffect(() => {
	```
	const config = {};
	const html = '';
	const eventListener = {};
	
	editor = new SynapEditor('synapeditor', config, html, eventListener);
	```
	return () => {
		if (editor) {
			```
			editor.destroy();
			editor = null;
			```
		}
	}
}, []);