Call free once a resource has been closed.