Refactor: Replace malloc savezoom with std::vector