Skip to content

Commit

Permalink
https://github.com/facebook/react-native/issues/25664
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinservicemax committed Aug 20, 2019
1 parent d285860 commit 3acca00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ReactCommon/jsi/JSCRuntime.cpp
Expand Up @@ -630,7 +630,9 @@ jsi::String JSCRuntime::createStringFromUtf8(
size_t length) {
std::string tmp(reinterpret_cast<const char*>(str), length);
JSStringRef stringRef = JSStringCreateWithUTF8CString(tmp.c_str());
return createString(stringRef);
auto result = createString(stringRef);
JSStringRelease(stringRef);
return result;
}

std::string JSCRuntime::utf8(const jsi::String& str) {
Expand Down Expand Up @@ -1411,4 +1413,4 @@ std::unique_ptr<jsi::Runtime> makeJSCRuntime() {
}

} // namespace jsc
} // namespace facebook
} // namespace facebook

0 comments on commit 3acca00

Please sign in to comment.