Silk.NET
Silk.NET copied to clipboard
Use DependentHandle or CWT for SilkMarshal.StringArrayToMemory
Instead of hoping for GC to catch on eventually, we should make the relation clear using DependentHandle (NET6+, thanks sergio) / CWT
How did you envision this working? StringArrayToMemory copies all of the data contained within the string array, so the lifetime of the returned memory is not dependent on the lifetime of its original array and vice versa, so there are no GC issues here really.
Closing per my previous comment.