Closed nmlgc closed 11 months ago
By removing some of the allocations, we'd also shorten the (already miniscule) load times by another bit.
Implemented it fairly quickly at the end of P0251, finishing with 443752ab5f016910392b138d062cc2ac691c0314. The DirectSound and MIDI code still uses LocalAlloc()
and LocalFree()
, but it does not matter there as that code can't be ported away from Windows anyway.
The game crashes quite frequently in debug configurations due to what seems to be use-after-free bugs. Clearly defined pointer ownership can help here, and replacing all the
LocalAlloc()
andLocalFree()
calls can also help with portability.The 西方Project lens ball animation (
LENS.CPP
) looks to be the most critical place that should be covered first.