ensure that the stack leak resources