You can also set your trees to be displayed in the viewport as bounding boxes before duplicating them, so it won’t take up much memory until render time. Also try to either use particles or Alt+D instead of Shift+D to make an instance – that will also save you a lot of memory.