Add YGConfigGetInstanceCount

- For memory leak unit test
- Expose the API for C#
This commit is contained in:
Kazuki Sakamoto
2017-03-29 10:47:17 -07:00
parent 8eed68e34b
commit a50e567c8a
3 changed files with 17 additions and 1 deletions

View File

@@ -138,6 +138,9 @@ namespace Facebook.Yoga
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern int YGNodeGetInstanceCount();
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern int YGConfigGetInstanceCount();
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern void YGConfigSetExperimentalFeatureEnabled(
YGConfigHandle config,

View File

@@ -63,5 +63,10 @@ namespace Facebook.Yoga
Native.YGConfigSetPointScaleFactor(_ygConfig, value);
}
}
public static int GetInstanceCount()
{
return Native.YGConfigGetInstanceCount();
}
}
}