4.6 Transition Guide

bumping this for anyone still doing 4.6 transition

Why was TSubObjectPtr deprecated? I read on their Answers page that it’s used in internal GC process, where the engine would be aware of the fact when the data was cleared and therefore automatically set the pointer to NULL, essentially making it easier on programmer to keep track of pointers. Do traditional C++ pointers now act the same way as TSubObjectPtr used to?

To paraphrase Epic’s own statement, TSubObjectPtr was clunky and weird, and using regular pointers is so much cleaner and simpler!

As long as you use UPROPERTY() with your pointer, it will follow normal garbage collections rules.

I have a full wiki on UE4 Garbage Collection and UPROPERTY() :

Garbage Collection in UE4
https://wiki.unrealengine.com/Garbage_Collection_%26_Dynamic_Memory_Allocation

Seriously, I get all my C++ info from , Epic should hire you because like others said, this board is nothing without your help.

Can this get a sticky please?

I think it’s safe to say I love you .

Oh, I didn’t know about all these awesome C++ tutorial, thanks a lot !

Hee hee!

Hee hee!! * Blushes *

you’re welcome!

:slight_smile: