Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a84a23f authored by Yang Ni's avatar Yang Ni
Browse files

Do not CloseGuard KernelID or FieldID

Bug: 28053584

Stop CloseGuarding for two reasons:

1) KernelID and FieldID objects are constructed in auto-generated
(RenderScript reflected) Java code. It would be impossible for a user to
explicitly call destroy() on them. Guarding them would leave a lot of
noisy warnings in logcat.

2) These KernelID and FieldID objects are not big compared to other
RenderScript objects, e.g. Allocations. They occupy almost no native
resources except for a native pointer. Leaving their destruction to Java
GC would be completely acceptable, since any delay in reclaiming them is
unlikely to cause memory pressure.

Test: CTS on x86_64 emulator
Change-Id: I587b5561a0b2bdbf0b2e95bf2995c20d5f5faf9d
parent f02b7b7b
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ public class Script extends BaseObj {
            mScript = s;
            mSlot = slot;
            mSig = sig;
            guard.open("destroy");
        }
    }

@@ -119,7 +118,6 @@ public class Script extends BaseObj {
            super(id, rs);
            mScript = s;
            mSlot = slot;
            guard.open("destroy");
        }
    }