Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4af0351

Browse files
Fix issue #6 by ref counting System::String objects created from string literals
1 parent ac7bb11 commit 4af0351

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎Unity/CppSource/NativeScript/Bindings.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@ namespace System
10931093
String::String(const char* chars)
10941094
: Object(Plugin::InternalUse::Only, Plugin::StringNew(chars))
10951095
{
1096+
Plugin::ReferenceManagedClass(Handle);
10961097
}
10971098

10981099
ICloneable::ICloneable(Plugin::InternalUse iu, int32_t handle)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /