/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*
*/
-
+using System.ComponentModel;
using System.Runtime.InteropServices;
namespace Tizen.NUI
/// <since_tizen> 3 </since_tizen>
public class TextureSet : BaseHandle
{
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
/// <summary>
/// Create an instance of TextureSet.
public TextureSet() : this(Interop.TextureSet.TextureSet_New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
}
internal TextureSet(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TextureSet.TextureSet_SWIGUpcast(cPtr), cMemoryOwn)
{
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
/// <summary>
{
//to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = Interop.TextureSet.TextureSet_GetSampler(swigCPtr, index);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Sampler;
- Interop.BaseHandle.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
+ Sampler ret = this.GetInstanceSafely<Sampler>(cPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- /// <summary>
- /// Dispose.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- protected override void Dispose(DisposeTypes type)
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
- if (disposed)
- {
- return;
- }
-
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
- //Release your own unmanaged resources here.
- //You should not access any managed member here except static instance.
- //because the execution order of Finalizes is non-deterministic.
-
- if (swigCPtr.Handle != global::System.IntPtr.Zero)
- {
- if (swigCMemOwn)
- {
- swigCMemOwn = false;
- Interop.TextureSet.delete_TextureSet(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
-
- base.Dispose(type);
+ Interop.TextureSet.delete_TextureSet(swigCPtr);
}
}
-
-}
\ No newline at end of file
+}