void onUpdateConfig(TL_config *config) { NativeByteBuffer *buffer = BuffersStorage::getInstance().getFreeBuffer(config->getObjectSize()); config->serializeToStream(buffer); buffer->position(0); jniEnv->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onUpdateConfig, buffer); buffer->reuse(); }
void reuse(JNIEnv *env, jclass c, jint address) { NativeByteBuffer *buffer = (NativeByteBuffer *) address; buffer->reuse(); }