Skip to content

Replace LocalAlloc/LocalFree with HeapAlloc/HeapFree - #16219

Closed
msmshazan wants to merge 4 commits into
libsdl-org:mainfrom
msmshazan:patch-1
Closed

msmshazan wants to merge 4 commits into
libsdl-org:mainfrom
msmshazan:patch-1

Conversation

@msmshazan

@msmshazan msmshazan commented Aug 30, 2026

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

Replace Local Allocation functions with the modern Heap functions as suggested in https://learn.microsoft.com/en-us/windows/win32/memory/comparing-memory-allocation-methods

Existing Issue(s)

No issues
Just a suggestive improve

@madebr

madebr commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

The GameInput.cpp source is vendored code from Microsoft GameInput.
See https://github.com/microsoftconnect/GameInput/blob/6066e65573903d91b6497d8e81094f752edf335f/releases/v3.3.195/lib/GameInput.cpp#L77

Perhaps suggest this change there?
This allocation is a one-time allocation so I don't think it matters much.

@msmshazan

msmshazan commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

The GameInput.cpp source is vendored code from Microsoft GameInput. See https://github.com/microsoftconnect/GameInput/blob/6066e65573903d91b6497d8e81094f752edf335f/releases/v3.3.195/lib/GameInput.cpp#L77

Perhaps suggest this change there? This allocation is a one-time allocation so I don't think it matters much.

Yes will look into it over there as well

Raised PR : microsoftconnect/GameInput#48

@slouken

slouken commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Please submit this PR to the upstream repo, and we'll pick up if it's accepted from there.

@slouken slouken closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants