using Tizen.Uix.VoiceControl;
/// <summary>
-/// Partial Interop Class
+/// Partial interop class.
/// </summary>
internal static partial class Interop
{
/// <summary>
- /// VoiceControlCommand Interop Class
+ /// VoiceControlCommand interop class.
/// </summary>
internal static class VoiceControlCommand
{
internal sealed class SafeCommandListHandle : SafeHandle
{
+ internal bool _ownership;
+
public SafeCommandListHandle(IntPtr handle)
: base(handle, true)
{
+ _ownership = true;
}
public SafeCommandListHandle()
: base(IntPtr.Zero, true)
{
+ _ownership = true;
}
public override bool IsInvalid
protected override bool ReleaseHandle()
{
- if (!IsInvalid)
+ if (_ownership && !IsInvalid)
{
Interop.VoiceControl.ErrorCode error = VcCmdListDestroy(this.handle, false);
if (error != Interop.VoiceControl.ErrorCode.None)