Silk.NET icon indicating copy to clipboard operation
Silk.NET copied to clipboard

Use DependentHandle or CWT for SilkMarshal.StringArrayToMemory

Open HurricanKai opened this issue 5 years ago • 2 comments

Instead of hoping for GC to catch on eventually, we should make the relation clear using DependentHandle (NET6+, thanks sergio) / CWT

HurricanKai avatar Jul 10 '21 18:07 HurricanKai

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.

Perksey avatar Jan 21 '23 17:01 Perksey

Closing per my previous comment.

Perksey avatar Sep 14 '23 18:09 Perksey