detach geometry shader before freeing it