Register doesn't know upfront how many resource descriptors will be present. Do you want another parameter for register (something like 'do_dereferencing_now')?