Click here to Skip to main content
15,881,044 members
Articles / Containers / Virtual Machine

Observable property pattern, memory leaks, and weak delegates for .NET

Rate me:
Please Sign up or sign in to vote.
4.96/5 (42 votes)
4 Dec 200624 min read 217.1K   359   174  
This article is dedicated to the observable property design pattern, a very nice pattern used in the Microsoft .NET Framework, a possible memory leak problem with it, and gives a couple of ways to solve it.
using System;
using System.Runtime.InteropServices;

namespace Pvax.WeakDelegates.Tests
{
	/// <summary>
	/// Description of DoubleHandler delegate.
	/// </summary>
	[Serializable]
	[ComVisible(false)]
	public delegate double DoubleHandler5(object sender, string arg2, int arg3, DateTime arg4, float arg5);
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Russian Federation Russian Federation
I'm a system administrator from Moscow, Russia. Programming is one of my hobbies. I presume I'm one of the first Russians who created a Web site dedicated to .Net known that time as NGWS. However, the Web page has been abandoned a long ago.

Comments and Discussions