Info
Version: | 1.0.2 |
Author(s): | Craig Gidney |
Last Update: | Tuesday, January 8, 2013 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/TwistedOakStudios/Lifetime |
NuGet Url: | https://www.nuget.org/packages/TwistedOak.Util.Lifetime |
Install
Install-Package TwistedOak.Util.Lifetime
dotnet add package TwistedOak.Util.Lifetime
paket add TwistedOak.Util.Lifetime
TwistedOak.Util.Lifetime Download (Unzip the "nupkg" after downloading)
Dependencies
1 package depend on this package.
Tags
Motivation: cancellation tokens can be the source of memory "leaks", because an unbounded number of completed operations may have registered now-pointless callbacks on a token that can't be released or cancelled.
The callbacks may reference all kinds of data, preventing effective garbage collection. Using a Lifetime allows fixing these issues because callback registrations can be given lifetimes of their own.
Additional utilities: LifetimeSource, LifetimeExchanger, DisposableLifetime, Max, Min, CreateDependentSource.