예제 #1
0
		/// <summary>
		/// Releases unmanaged and - optionally - managed resources
		/// </summary>
		/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
		protected override void Dispose(bool disposing)
		{
			HandleManager.RegisterHandleDestroyed(null);

			if (disposing)
			{
				_handleDestroyed = null;
				HandleDestroyed = null;
			}
		}
		void IHandleManager.RegisterHandleDestroyed(HandleListenerHandleDestroyedHandler handleDestroyed)
		{
			CheckStaticOnlyCall();
			
			NativeHandleManager.RegisterHandleDestroyed(handleDestroyed);
		}
예제 #3
0
		public static extern void RegisterHandleDestroyed(HandleListenerHandleDestroyedHandler handleDestroyed);
예제 #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="HandleListenerDispatcher"/> class.
		/// </summary>
		internal HandleListenerDispatcher()
		{
			_handleDestroyed = OnHandleDestroyed;
			HandleManager.RegisterHandleDestroyed(_handleDestroyed);
		}