[NUCCORE-1202] Add missing resource release; if acquiring it you have to
release in a finally so the reference count will work