netty5/transport-native-epoll/src
Norman Maurer 23840b76d7 [#2623] Release local references to guard against StackOverflow in JNI
Motivation:

When we do a (env*)->GetObjectArrayElement(...) call we may created many local references which will only be cleaned up once we exist the native method. Thus a lot of memory can be used and so a StackOverFlow may be triggered. Beside this the JNI specification only say that an implementation must cope with 16 local references.

Modification:

Call (env*)->ReleaseLocalRef(...) to release the resource once not needed anymore.

Result:

Less memory usage and guard against StackOverflow
2014-06-30 09:57:13 +02:00
..
main [#2623] Release local references to guard against StackOverflow in JNI 2014-06-30 09:57:13 +02:00
test/java/io/netty/channel/epoll