The native handle should not be null before calling Dispose() method.
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
eventObject.Handle = IntPtr.Zero;
}
- internal IntPtr Handle { get { return _handle; } set { _handle = value; } }
+ internal IntPtr Handle { get { return _handle; } }
internal IntPtr Source { get; set; }
internal int Id { get; set; }
throw new ArgumentNullException(nameof(coreEvent));
}
- if (coreEvent.Handle == IntPtr.Zero)
+ if (coreEvent.Source != IntPtr.Zero)
{
throw new ArgumentException("The event is already added");
}
}
coreEvent.Source = handle;
- coreEvent.Handle = IntPtr.Zero;
}
}