MCPcopy Create free account
hub / github.com/catboost/catboost / TObjectRef

Method TObjectRef

library/cpp/jni/jni.cpp:40–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39template <typename TRefPolicy, typename TObject>
40TObjectRef<TRefPolicy, TObject>::TObjectRef(TObject object) {
41 static_assert(std::is_base_of<std::remove_pointer_t<jobject>, std::remove_pointer_t<TObject>>::value);
42 auto* env = Env()->GetJniEnv();
43 Object = static_cast<TObject>(TRefPolicy::Ref(object, env));
44}
45
46// Specialization - don't unref class TSingletonRef's
47template<>

Callers

nothing calls this directly

Calls 3

EnvFunction · 0.85
RefFunction · 0.50
GetJniEnvMethod · 0.45

Tested by

no test coverage detected