News for hackers. Stuff that matters.
Re:On the impossibility of composing finalizers and FFI by ptx on Tuesday February 27, 2024 @08:37AM (#39523900)
If the problem with the second work-around (the reason it's not satisfactory) is that it's not supported as part of the platform, forcing you to use a "trick" to "outsmart the compiler", then C# has this solved: System.GC.KeepAlive [1] is an official part of the .NET platform and documented to do exactly this, so presumably Microsoft would not break it when making changes to the GC.

[1] https://learn.microsoft.com/en-us/dotnet/api/system.gc.keepa...

There are no comments on this comment yet.