first cut of nobug_resource_leave()