How to dynamically allocate memory, self memory management

Anytime you use UCLASS, USTRUCT, UENUM, it is going to be a part of UE4’s memory management system as that is what these macros will do.

As for managing your own memory, I would suggest not using any UE4 macro as I am still not 100% on what each will do, only that they are setup for memory management. If you create a class that doesn’t extend anything from UE4, such as UObject, you are then probably expected to manage any memory reserved for those types.

It is kind of an odd thing to try and manage in the game frame work because memory management is very much a part of it and meant to be used.