allow to provide a private pointer to the deep_copy callback