Prevent GC delegates

This commit is contained in:
Kazuki Sakamoto
2017-02-13 09:00:27 -08:00
parent 3304c1ae5d
commit e11a84423d
2 changed files with 15 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ namespace Facebook.Yoga
private static bool _initialized;
public static Func _loggerInternal = LoggerInternal;
public static Func Logger = null;
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
@@ -45,7 +46,7 @@ namespace Facebook.Yoga
{
if (!_initialized)
{
Native.YGInteropSetLogger(LoggerInternal);
Native.YGInteropSetLogger(_loggerInternal);
_initialized = true;
}
}