Rama
(Rama)
2
private:
UPROPERTY()
UTexture2D *Texture;
Is indeed the correct way
Use UPROPERTY to tell the UE4 GC system to leave your texture, or any spawned/ new object asset alone ![:slight_smile: :slight_smile:](https://d1ap1mz92jnks1.cloudfront.net/images/emoji/twitter/slight_smile.png?v=12)
Null out the reference when you are ready to have it GC’ed
Texture = nullptr;
#Wiki Tutorial on GC and Dynamic Memory Management
1 Like