*
*/
+using System.Runtime.InteropServices;
+
namespace Tizen.NUI
{
public Texture GetColorTexture()
{
+ //to fix memory leak issue, match the handle count with native side.
global::System.IntPtr cPtr = NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr);
- Texture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
* limitations under the License.
*
*/
+using System.Runtime.InteropServices;
using Tizen.NUI.BaseComponents;
namespace Tizen.NUI
{
public VisualBase GetVisual(int index)
{
+ //to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index);
- VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as VisualBase;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as VisualBase;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
using System;
using System.ComponentModel;
+using System.Runtime.InteropServices;
namespace Tizen.NUI.BaseComponents
{
/// <since_tizen> 3 </since_tizen>
protected override void Dispose(DisposeTypes type)
{
- if(disposed)
+ if (disposed)
{
return;
}
- if(type == DisposeTypes.Explicit)
+ if (type == DisposeTypes.Explicit)
{
//Called by User
//Release your own managed resources here.
/// <since_tizen> 3 </since_tizen>
~CellPosition()
{
- if(!isDisposeQueued)
+ if (!isDisposeQueued)
{
isDisposeQueued = true;
DisposeQueue.Instance.Add(this);
return;
}
- if(type == DisposeTypes.Explicit)
+ if (type == DisposeTypes.Explicit)
{
//Called by User
//Release your own managed resources here.
/// <since_tizen> 3 </since_tizen>
public View GetChildAt(TableView.CellPosition position)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public View RemoveChildAt(TableView.CellPosition position)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- PositionUsesPivotPoint = false;
+ if (HasBody())
+ {
+ PositionUsesPivotPoint = false;
+ }
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
/// <since_tizen> 4 </since_tizen>
public override Container GetParent()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
internal bool IsTopLevelView()
{
- if(GetParent() is Layer)
+ if (GetParent() is Layer)
{
return true;
}
/// <since_tizen> 3 </since_tizen>
protected override void Dispose(DisposeTypes type)
{
- if(disposed)
+ if (disposed)
{
return;
}
- if(type == DisposeTypes.Explicit)
+ if (type == DisposeTypes.Explicit)
{
//Called by User
//Release your own managed resources here.
Delegate[] delegateList = _keyEventHandler.GetInvocationList();
// Oring the result of each callback.
- foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
+ foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
{
- result |= del( this, e );
+ result |= del(this, e);
}
}
/// background visual, creates one with transparent black as it's mixColor.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Animation AnimateBackgroundColor( object destinationValue,
+ public Animation AnimateBackgroundColor(object destinationValue,
int startTime,
int endTime,
AlphaFunction.BuiltinFunctions? alphaFunction = null,
{
Tizen.NUI.PropertyMap background = Background;
- if( background.Empty() )
+ if (background.Empty())
{
// If there is no background yet, ensure there is a transparent
// color visual
BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
background = Background;
}
- return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
+ return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
}
/// <summary>
/// Creates an animation to animate the mixColor of the named visual.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
+ public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
{
Animation animation = null;
{
PropertyMap _animator = new PropertyMap();
- if( alphaFunction != null )
+ if (alphaFunction != null)
{
- _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
+ _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
}
PropertyMap _timePeriod = new PropertyMap();
- _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
- _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
- _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
+ _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
+ _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
+ _animator.Add("timePeriod", new PropertyValue(_timePeriod));
PropertyMap _transition = new PropertyMap();
- _transition.Add( "animator", new PropertyValue( _animator ) );
- _transition.Add( "target", new PropertyValue( targetVisual ) );
- _transition.Add( "property", new PropertyValue( "mixColor" ) );
+ _transition.Add("animator", new PropertyValue(_animator));
+ _transition.Add("target", new PropertyValue(targetVisual));
+ _transition.Add("property", new PropertyValue("mixColor"));
- if( initialColor != null )
+ if (initialColor != null)
{
- PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
- _transition.Add( "initialValue", initValue );
+ PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
+ _transition.Add("initialValue", initValue);
}
- PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
- _transition.Add( "targetValue", destValue );
- TransitionData _transitionData = new TransitionData( _transition );
+ PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
+ _transition.Add("targetValue", destValue);
+ TransitionData _transitionData = new TransitionData(_transition);
- animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
+ animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
- GetProperty( View.Property.BACKGROUND ).Get(temp);
+ GetProperty(View.Property.BACKGROUND).Get(temp);
return temp;
}
set
switch (temp)
{
case 0:
- {
- return States.Normal;
- }
+ {
+ return States.Normal;
+ }
case 1:
- {
- return States.Focused;
- }
+ {
+ return States.Focused;
+ }
case 2:
- {
- return States.Disabled;
- }
+ {
+ return States.Disabled;
+ }
default:
- {
- return States.Normal;
- }
+ {
+ return States.Normal;
+ }
}
}
set
switch (value)
{
case States.Normal:
- {
- valueToString = "NORMAL";
- break;
- }
+ {
+ valueToString = "NORMAL";
+ break;
+ }
case States.Focused:
- {
- valueToString = "FOCUSED";
- break;
- }
+ {
+ valueToString = "FOCUSED";
+ break;
+ }
case States.Disabled:
- {
- valueToString = "DISABLED";
- break;
- }
+ {
+ valueToString = "DISABLED";
+ break;
+ }
default:
- {
- valueToString = "NORMAL";
- break;
- }
+ {
+ valueToString = "NORMAL";
+ break;
+ }
}
SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
}
switch (value)
{
case Tizen.NUI.HorizontalAlignmentType.Left:
- {
- valueToString = "left";
- break;
- }
+ {
+ valueToString = "left";
+ break;
+ }
case Tizen.NUI.HorizontalAlignmentType.Center:
- {
- valueToString = "center";
- break;
- }
+ {
+ valueToString = "center";
+ break;
+ }
case Tizen.NUI.HorizontalAlignmentType.Right:
- {
- valueToString = "right";
- break;
- }
+ {
+ valueToString = "right";
+ break;
+ }
default:
- {
- valueToString = "left";
- break;
- }
+ {
+ valueToString = "left";
+ break;
+ }
}
SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
}
switch (value)
{
case Tizen.NUI.VerticalAlignmentType.Top:
- {
- valueToString = "top";
- break;
- }
+ {
+ valueToString = "top";
+ break;
+ }
case Tizen.NUI.VerticalAlignmentType.Center:
- {
- valueToString = "center";
- break;
- }
+ {
+ valueToString = "center";
+ break;
+ }
case Tizen.NUI.VerticalAlignmentType.Bottom:
- {
- valueToString = "bottom";
- break;
- }
+ {
+ valueToString = "bottom";
+ break;
+ }
default:
- {
- valueToString = "top";
- break;
- }
+ {
+ valueToString = "top";
+ break;
+ }
}
SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
}
}
set
{
- if(value)
+ if (value)
{
LeftFocusableViewId = (int)value.GetId();
}
}
set
{
- if(value)
+ if (value)
{
RightFocusableViewId = (int)value.GetId();
}
}
set
{
- if(value)
+ if (value)
{
UpFocusableViewId = (int)value.GetId();
}
}
set
{
- if(value)
+ if (value)
{
DownFocusableViewId = (int)value.GetId();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Layer GetLayer()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
- Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <since_tizen> 3 </since_tizen>
public View FindChildByName(string viewName)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
internal View FindChildById(uint id)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
/// <since_tizen> 3 </since_tizen>
public Renderer GetRendererAt(uint index)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
- Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
switch (temp)
{
case "NORMAL":
- return DrawModeType.Normal;
+ return DrawModeType.Normal;
case "OVERLAY_2D":
- return DrawModeType.Overlay2D;
+ return DrawModeType.Overlay2D;
case "STENCIL":
- return DrawModeType.Stencil;
+ return DrawModeType.Stencil;
default:
- return DrawModeType.Normal;
+ return DrawModeType.Normal;
}
}
set
switch (temp)
{
case "DISABLED":
- return ClippingModeType.Disabled;
+ return ClippingModeType.Disabled;
case "CLIP_CHILDREN":
- return ClippingModeType.ClipChildren;
+ return ClippingModeType.ClipChildren;
case "CLIP_TO_BOUNDING_BOX":
- return ClippingModeType.ClipToBoundingBox;
+ return ClippingModeType.ClipToBoundingBox;
default:
- return ClippingModeType.Disabled;
+ return ClippingModeType.Disabled;
}
}
set
/// <since_tizen> 3 </since_tizen>
public View GetCurrentFocusView()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr);
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
return ret;
}
/// <since_tizen> 3 </since_tizen>
public View GetFocusGroup(View view)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view));
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
-
-
- /*View ret = new View(NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- if (ret.HasBody() == false)
- {
- return null;
- }*/
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
return ret;
}
internal View GetFocusIndicatorView()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr);
-
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
return ret;
}
/// <since_tizen> 3 </since_tizen>
public View FindChildById(uint id)
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
*
*/
+using System.Runtime.InteropServices;
+
namespace Tizen.NUI
{
/// <summary>
/// <since_tizen> 3 </since_tizen>
public Geometry GetGeometry()
{
+ //to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetGeometry(swigCPtr);
- Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Geometry;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Geometry;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public TextureSet GetTextures()
{
+ //to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetTextures(swigCPtr);
- TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TextureSet;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as TextureSet;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public Shader GetShader()
{
+ //to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetShader(swigCPtr);
- Shader ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Shader;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Shader ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Shader;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
*
*/
+using System.Runtime.InteropServices;
+
namespace Tizen.NUI
{
/// <summary>
/// <since_tizen> 3 </since_tizen>
public Texture GetTexture(uint index)
{
+ //to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = NDalicPINVOKE.TextureSet_GetTexture(swigCPtr, index);
- Texture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public Sampler GetSampler(uint index)
{
+ //to fix memory leak issue, match the handle count with native side.
System.IntPtr cPtr = NDalicPINVOKE.TextureSet_GetSampler(swigCPtr, index);
- Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Sampler;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Sampler;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
namespace Tizen.NUI
{
+ using System.Runtime.InteropServices;
using Tizen.NUI.BaseComponents;
/// <summary>
/// Touch events are a collection of points at a specific moment in time.<br />
/// <since_tizen> 3 </since_tizen>
public View GetHitView(uint point)
{
+ //to fix memory leak issue, match the handle count with native side.
global::System.IntPtr cPtr = NDalicPINVOKE.Touch_GetHitActor(swigCPtr, point);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal View GetTitle()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal View GetContent()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal View GetFooter()
{
+ //to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+ HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+ NDalicPINVOKE.delete_BaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;