mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 16:48:12 +02:00
* pas2jni: Explicitly release JNI local refs while executing method pointers.
git-svn-id: trunk@33859 -
This commit is contained in:
parent
4fba4cab15
commit
c392c6eb2b
@ -1270,6 +1270,9 @@ begin
|
||||
Fps.WriteLn('begin');
|
||||
Fps.IncI;
|
||||
Fps.WriteLn('CurJavaVM^^.GetEnv(CurJavaVM, @_env, JNI_VERSION_1_6);');
|
||||
Fps.WriteLn('_env^^.PushLocalFrame(_env, 100);');
|
||||
Fps.WriteLn('try');
|
||||
Fps.IncI;
|
||||
Fps.WriteLn('_MethodPointersCS.Enter;');
|
||||
Fps.WriteLn('try');
|
||||
Fps.WriteLn('_mpi:=_TMethodPtrInfo(_MethodPointers[-integer(ptruint(Self)) - 1]);', 1);
|
||||
@ -1330,6 +1333,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
Fps.DecI;
|
||||
Fps.WriteLn('finally');
|
||||
Fps.WriteLn('_env^^.PopLocalFrame(_env, nil);', 1);
|
||||
Fps.WriteLn('end;');
|
||||
Fps.DecI;
|
||||
Fps.WriteLn('end;');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user