PushLocalFrame/PopLocalFrame

M

masherman1970

Hello,

Let's say I have two c++ funcs: foo and bar. Inside of foo I call
PushLocalFrame, then I call bar, and then I call PopLocalFrame. Will
this delete local java refs created in bar?

// begin psuedo code

void bar()
{
local_ref = jni_env->NewObject()
}

void foo()
{
PushLocalFrame()
bar()
PopLocalFrame()
}

// end pseudo code

thanks,
Marc
 
G

Gordon Beaton

Let's say I have two c++ funcs: foo and bar. Inside of foo I call
PushLocalFrame, then I call bar, and then I call PopLocalFrame. Will
this delete local java refs created in bar?

Yes. The depth of C++ calls has no relevance.

In fact you normally don't need to call PushLocalFrame() or
PopLocalFrame() at all, since the original call into native code is
already wrapped in a similar manner.

/gordon
 
M

masherman1970

Gordon said:
Yes. The depth of C++ calls has no relevance.

In fact you normally don't need to call PushLocalFrame() or
PopLocalFrame() at all, since the original call into native code is
already wrapped in a similar manner.

/gordon

Thank you!

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top