From c80e9ee431af42948ee213278f33536227c692c2 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Fri, 26 Jul 2019 16:59:58 +0300 Subject: [PATCH] C: don't add native functions to GC roots --- .../java/org/teavm/model/lowlevel/NativePointerFinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/teavm/model/lowlevel/NativePointerFinder.java b/core/src/main/java/org/teavm/model/lowlevel/NativePointerFinder.java index 8fa025363..280100fa4 100644 --- a/core/src/main/java/org/teavm/model/lowlevel/NativePointerFinder.java +++ b/core/src/main/java/org/teavm/model/lowlevel/NativePointerFinder.java @@ -119,6 +119,7 @@ public class NativePointerFinder { return false; } String className = ((ValueType.Object) type).getClassName(); - return characteristics.isStructure(className) || className.equals(Address.class.getName()); + return characteristics.isStructure(className) || className.equals(Address.class.getName()) + || characteristics.isFunction(className); } }