This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: BH8HnvFToeU--EcPQZG6owlGwDWqdTuqHb0IAEcRKHY
Cover

Give Your .NET Object A Shot Of Lifeline [Tutorial]

Written by @anand-gupta | Published on 2020/8/3

TL;DR
In this post, we will see an example of a scenario where we may want to extend the lifetime of an object. We will look at how we can accomplish this in two ways — one is writing an API ourselves (in the spirit of learning by doing) and other is to use existing API in.NET. The Lifeline.KeepAlive() method has absolutely no code in it. The key feature of this method is the attribute on the method [MethodImpl(MethodImplOptions.NoInlining) This guarantees the JIT will never try to inline this method.

[story continues]


Written by
@anand-gupta
Passionate Techie, Binge Watcher, Globe trotter

Topics and
tags
technology|tutorial|dotnet|eager-root-collection|using-api-in-dotnet|extend-lifeline-in-dotnet|programming|dotnet-tutorial
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: BH8HnvFToeU--EcPQZG6owlGwDWqdTuqHb0IAEcRKHY