SCHEMA-50. Update code to new resource retain/release mechanism.