Add control over when resources are released. AH-431