Use ReusableBuffer instead. This removes the manual management (or at least moves it somewhere else...) and avoids allocating and deleting a temporary buffer for every glyph that is rendered into a sprite.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
The bug fix is important enough to be backported? (label: 'backport requested')
This PR touches english.txt or translations? Check the guidelines
This PR affects the save game format? (label 'savegame upgrade')
This PR affects the GS/AI API? (label 'needs review: Script API')
ai_changelog.hpp, game_changelog.hpp need updating.
The compatibility wrappers (compat_*.nut) need updating.
This PR affects the NewGRF API? (label 'needs review: NewGRF')
Motivation / Problem
Manual new[]/delete[] in Win32FontCache.
Description
Use ReusableBuffer instead. This removes the manual management (or at least moves it somewhere else...) and avoids allocating and deleting a temporary buffer for every glyph that is rendered into a sprite.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.