Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1.24 KB

README.md

File metadata and controls

28 lines (19 loc) · 1.24 KB

Weak Delegate .NET

This is a working concept of a weak delegate for .NET Framework.
It is like the .NET Weak Reference but for methods and delegates.

It is used in production systems and is very useful with solving of .NET Framework memory leaks.

Have a fun to use.

How to use

Mostly it will be used like the any Action or Func delegates of .NET Framework.

You should kinda wrap your method reference by a WeakAction or WeakFunk class. Voila, we have your firs weak delegate and you can do any your raw (dirty) coding.

Key tips

On top of this project of the Weak Delegate were created projects:

tl;dr if you want to take some deeper

It was intentionally created to support older versions of .NET. I.e. for .NET 4.0 and Silverlight 4.

It does not require any effort to convert it to the newest .NET versions.
It is easy to adapt it to the .NET 3.0 or 3.5.
But it requires some tentions to adapt it for the .NET 2.0 (It's a matter of time but approaches are ready).