removing a component inside a member function of this component #981
-
Hello, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If the component is assigned to |
Beta Was this translation helpful? Give feedback.
If the component is assigned to
m_entity
, then yes, it's destroyed.Is it safe? According to C++, yes. It's not different from doing a
delete this
, which is perfectly fine in C++ if you know what you're doing. 🤷♂️On the other hand, if the question is am I going to hurt myself? Well, I don't know 🙂 since I don't have access to the full codebase nor the time to inspect it to give you a proper answer.