diff options
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/sal/ByteBufferWrapper.hxx | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/sal/inc/sal/ByteBufferWrapper.hxx b/sal/inc/sal/ByteBufferWrapper.hxx index 954922d65b16..63bb618278d6 100644 --- a/sal/inc/sal/ByteBufferWrapper.hxx +++ b/sal/inc/sal/ByteBufferWrapper.hxx @@ -21,25 +21,14 @@ namespace org { namespace libreoffice { namespace touch { class ByteBufferWrapper { private: - JNIEnv *env; - jobject object; + jobject object; public: - ByteBufferWrapper(JNIEnv *e, jobject o) : - env(e) - { - object = env->NewGlobalRef(o); - } - - sal_uInt8* pointer() - { - return (sal_uInt8 *) env->GetDirectBufferAddress(object); - } - - void operator()(sal_uInt8 * /* p */) - { - env->DeleteGlobalRef(object); - } + ByteBufferWrapper(JNIEnv *env, jobject o); + + sal_uInt8* pointer(); + + void operator()(sal_uInt8 *p); }; }; }; }; |