File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,19 @@ Component::Component(BNComponent* component)
2525
2626std::string Component::GetDisplayName ()
2727{
28- return BNComponentGetDisplayName (m_object);
28+ char * result = BNComponentGetDisplayName (m_object);
29+ string stringResult = result;
30+ BNFreeString (result);
31+ return stringResult;
2932}
3033
3134
3235std::string Component::GetName ()
3336{
34- return BNComponentGetOriginalName (m_object);
37+ char * result = BNComponentGetOriginalName (m_object);
38+ string stringResult = result;
39+ BNFreeString (result);
40+ return stringResult;
3541}
3642
3743
@@ -55,7 +61,10 @@ Ref<Component> Component::GetParent()
5561
5662std::string Component::GetGuid ()
5763{
58- return string (BNComponentGetGuid (m_object));
64+ char * result = BNComponentGetGuid (m_object);
65+ string stringResult = result;
66+ BNFreeString (result);
67+ return stringResult;
5968}
6069
6170
You can’t perform that action at this time.
0 commit comments