Hey, everyone! Still trying to get grisp of c++…
Before this, I was always using TArray<SomeUCLass*> to handle stuff, it just works;
Then, I decided to also connect DataTables in my game, so had to use ustructs, and ending up with something like
So, before this, I could access data like this:
My question is:
do I need any extra manual handling now? Like, I am actually accessing data copy here or direct data? I guess I can not treat struct same as pointer, need something else to keep in mind?
Also, am I correct, that when passing it to the function, I should always use:
i.e., pass it as reference?
Before this, I did:
I just want to avoid common mistakes, like creating memory leaks or data copies.
Is there abything else I should know or might be forgetting?
I know that I can read any online manual data on pointers and structs in depth, but I guess UE4 adds its own flavor to all this, so I need to ask here to be sure. Thanks!