Announcement

Collapse
No announcement yet.

Do I have to handle manually memory allocation for custom classes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Do I have to handle manually memory allocation for custom classes?

    So, up to this point I worked only with classes derived from UObject and AActor, but now I'm moving towards composition stuff and my own little "Components" are simple classes, not derived from UObject or any UE4 classes.
    They are extremely primitive and basicaly they have variables, calculate stuff and behaviour and then pass data into actual UE4 components.
    My question is - Do I have to handle C++ memory allocation part by myself, because UE4 GC working only with classes derived from UE4 classes?
    Last edited by zeOrb; 12-26-2014, 09:40 AM.
    SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
    Level design and prototyping for newbies

    #2
    IF you are using anything else than UObjects, you have to manage memory manually.

    Though smart pointers, should make it bit easier.
    Like TSharedPtr<>, TWeakPtr<>, TAssetPtr<> etc. There are lots of them.
    Though if coruse those present it's own challenges like circular references.
    https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

    Comment

    Working...
    X