Pointer<Void> toCpp() { if (strongPointer != nullptr) { return strongPointer; } if (weakPointer != nullptr) { return weakPointer; } return nullptr; }