Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

When call DeleteLocalRef?

843829Apr 7 2008 — edited Apr 11 2008
If I'm calling a void java method while in C++ and I created some local object inside the c++ method (e.g. creating NewStringUTF) after calling CallVoidMethod should I ALWAYS call DeleteLocalRef? What about for a method that returns a value? How do i know when to DeleteLocalRef?

(And if you know, is there a diff. between ReleaseStringChars and DeleteLocalRef? Can i just use DeleteLocalRef?)

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 9 2008
Added on Apr 7 2008
5 comments
728 views