]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/rocksjni/rocks_callback_object.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
6 // This file implements the "bridge" between Java and C++ for
7 // JNI Callbacks from C++ to sub-classes or org.rocksdb.RocksCallbackObject
11 #include "include/org_rocksdb_RocksCallbackObject.h"
12 #include "jnicallback.h"
15 * Class: org_rocksdb_RocksCallbackObject
16 * Method: disposeInternal
19 void Java_org_rocksdb_RocksCallbackObject_disposeInternal(JNIEnv
* /*env*/,
22 // TODO(AR) is deleting from the super class JniCallback OK, or must we delete
23 // the subclass? Example hierarchies:
24 // 1) Comparator -> BaseComparatorJniCallback + JniCallback ->
25 // DirectComparatorJniCallback 2) Comparator -> BaseComparatorJniCallback +
26 // JniCallback -> ComparatorJniCallback
27 // I think this is okay, as Comparator and JniCallback both have virtual
29 delete reinterpret_cast<rocksdb::JniCallback
*>(handle
);
30 // @lint-ignore TXT4 T25377293 Grandfathered in