public void destroy() {
		super.destroy();
		layerBasket.clear();
		if (atomBufferArray != null) {
			for (Atom a : atomBufferArray) {
				a.setModel(null);
				a = null;
			}
		}
		setModel(null);
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				destroyPopupMenu(atomPopupMenu);
				destroyPopupMenu(radialBondPopupMenu);
				destroyPopupMenu(angularBondPopupMenu);
				destroyPopupMenu(moleculePopupMenu);
				destroyPopupMenu(molecularObjectPopupMenu);
				destroyPopupMenu(obstaclePopupMenu);
				destroyPopupMenu(defaultPopupMenu);
				destroyPopupMenu(acidPopupMenu);
				destroyPopupMenu(nucleotidePopupMenu);
				destroyPopupMenu(atomMutationPopupMenu);
			}
		});
	}