gpt4 book ai didi

java - Android展开JNI本地引用表

转载 作者:太空宇宙 更新时间:2023-11-03 11:50:43 24 4
gpt4 key购买 nike

我有很多对象要在 C++ 上创建并将其发送到 Java,我正在使用 env->DeleteLocalRef(obj); 但我收到以下错误:

06-10 18:43:56.976: E/dalvikvm(11536): JNI ERROR (app bug): local reference table overflow (max=512)
06-10 18:43:56.980: W/dalvikvm(11536): JNI local reference table (0x4d9c0b28) dump:
06-10 18:43:56.980: W/dalvikvm(11536): Last 10 entries (of 512):
06-10 18:43:56.980: W/dalvikvm(11536): 511: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 510: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 509: 0x40e2a2a8 la.jurema.moovebike.models.RoutePoint[] (20 elements)
06-10 18:43:56.980: W/dalvikvm(11536): 508: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 507: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 506: 0x412de350 java.lang.Class<la.jurema.moovebike.models.BikeRoute>
06-10 18:43:56.980: W/dalvikvm(11536): 505: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 504: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 503: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): 502: 0x412bab68 java.lang.Class<la.jurema.moovebike.models.RoutePoint>
06-10 18:43:56.980: W/dalvikvm(11536): Summary:
06-10 18:43:56.980: W/dalvikvm(11536): 505 of java.lang.Class (7 unique instances)
06-10 18:43:56.980: W/dalvikvm(11536): 3 of java.lang.String (3 unique instances)
06-10 18:43:56.980: W/dalvikvm(11536): 1 of java.lang.String[] (2 elements)
06-10 18:43:56.980: W/dalvikvm(11536): 1 of la.jurema.moovebike.network.DataDownloadResponseAbstract
06-10 18:43:56.980: W/dalvikvm(11536): 1 of la.jurema.moovebike.models.BikeRoute[] (15 elements)
06-10 18:43:56.980: W/dalvikvm(11536): 1 of la.jurema.moovebike.models.RoutePoint[] (20 elements)
06-10 18:43:56.980: E/dalvikvm(11536): Failed adding to JNI local ref table (has 512 entries)

我不知道这个 java.lang.Class 是什么意思...我该如何解决这个问题?增加引用表?或者我没有删除的内容?

最佳答案

您需要删除对类和对象的本地引用。

关于java - Android展开JNI本地引用表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17033438/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com