Add resource management copy function.