You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and a function which creates the object implementing interface:
__stdcall IString* CreateString()
{
return new RealStringClass();
}
This code is translated into a class inherited from SharpGen.Runtime.CppObject. I have looked at the implementation of CppObject class, however I did not manage to understand if destructor of CppObject destroys native object created by CreateString() call.
Could you give me any hint if the object is deleted automatically or should I destroy it manually?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
I have an interface
and a function which creates the object implementing interface:
This code is translated into a class inherited from SharpGen.Runtime.CppObject. I have looked at the implementation of CppObject class, however I did not manage to understand if destructor of CppObject destroys native object created by
CreateString()call.Could you give me any hint if the object is deleted automatically or should I destroy it manually?
P.S. Sorry for the misprint in the topic header
Beta Was this translation helpful? Give feedback.
All reactions