Memory ownership example