Home
last modified time | relevance | path

Searched refs:ScopedLocalRef (Results 1 – 6 of 6) sorted by relevance

/libnativehelper/header_only_include/nativehelper/
Dscoped_local_ref.h29 class ScopedLocalRef {
31 ScopedLocalRef(JNIEnv* env, T localRef) : mEnv(env), mLocalRef(localRef) { in ScopedLocalRef() function
34 ScopedLocalRef(ScopedLocalRef&& s) noexcept : mEnv(s.mEnv), mLocalRef(s.release()) { in ScopedLocalRef() function
37 explicit ScopedLocalRef(JNIEnv* env) : mEnv(env), mLocalRef(nullptr) { in ScopedLocalRef() function
40 ~ScopedLocalRef() { in ~ScopedLocalRef()
70 ScopedLocalRef& operator=(ScopedLocalRef&& s) noexcept {
90 DISALLOW_COPY_AND_ASSIGN(ScopedLocalRef);
Dutils.h143 ScopedLocalRef<jstring> __or_return_local_ref( \
/libnativehelper/tests/
Dlibnativehelper_test.cpp42 ScopedLocalRef<jstring> j_str(mEnv, mEnv->NewStringUTF("foo")); in TEST_F()
57 ScopedLocalRef<jstring> j_str(mEnv, mEnv->NewStringUTF("foo")); in TEST_F()
96 std::unique_ptr<ScopedLocalRef<jstring>> result; in TEST_F()
99 ScopedLocalRef<jstring> j_str = CREATE_UTF_OR_RETURN(env, "foo"); in TEST_F()
100 result.reset(new ScopedLocalRef<jstring>(std::move(j_str))); in TEST_F()
120 std::unique_ptr<ScopedLocalRef<jstring>> result; in TEST_F()
123 ScopedLocalRef<jstring> j_str = CREATE_UTF_OR_RETURN(env, MyString("foo")); in TEST_F()
124 result.reset(new ScopedLocalRef<jstring>(std::move(j_str))); in TEST_F()
136 std::unique_ptr<ScopedLocalRef<jstring>> result; in TEST_F()
139 ScopedLocalRef<jstring> j_str = CREATE_UTF_OR_RETURN(env, MyString("foo").c_str()); in TEST_F()
[all …]
Dscoped_local_ref_test.cpp22 ScopedLocalRef<jarray> slr1(env); in TestScopedLocalRef()
/libnativehelper/include/nativehelper/
DtoStringArray.h30 ScopedLocalRef<jobjectArray> result(env, env->NewObjectArray(count, stringClass, NULL)); in toStringArray()
36 ScopedLocalRef<jstring> s(env, env->NewStringUTF(visitor(i))); in toStringArray()
/libnativehelper/
DREADME.md28 Examples being `ScopedLocalRef` to manage the lifetime of local references and
80 * [nativehelper/ScopedLocalRef.h](include/nativehelper/ScopedLocalRef.h)