copy memory on set