Skip to content

Fix #15 mismatched NativeMemory.AlignedAlloc / NativeMemory.Free#16

Merged
xoofx merged 1 commit into
xoofx:mainfrom
matt-edmondson:fix/AudioProcessorModel-NativeMemory.Free-HeapCorruption
Jun 13, 2026
Merged

Fix #15 mismatched NativeMemory.AlignedAlloc / NativeMemory.Free#16
xoofx merged 1 commit into
xoofx:mainfrom
matt-edmondson:fix/AudioProcessorModel-NativeMemory.Free-HeapCorruption

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Fixes #15 by using NativeMemory.AlignedFree as indicated by the microsoft docs: https://learn.microsoft.com/dotnet/api/system.runtime.interopservices.nativememory.alignedalloc

@xoofx xoofx merged commit d0699a8 into xoofx:main Jun 13, 2026
1 check passed
@xoofx

xoofx commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Good catch, thanks!

@xoofx xoofx added the bug Something isn't working label Jun 13, 2026
@matt-edmondson matt-edmondson deleted the fix/AudioProcessorModel-NativeMemory.Free-HeapCorruption branch June 14, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AudioProcessorModel frees AlignedAlloc'd memory with NativeMemory.Free, causing heap corruption (0xC0000374) on Windows at Dispose

2 participants