Shouldn't we use the onHide callback to release resources?