Clear references to map data on level change
These shouldn't be left as they'll now point towards potentially invalid memory and also cause errors with serializing. Arrays and maps holding them are cleared. Also unlinks and relinks inventory items correctly from the hashmap on traveling.
This commit is contained in:
parent
29b2253bdb
commit
269689703d
6 changed files with 87 additions and 3 deletions
|
|
@ -245,6 +245,9 @@ public:
|
|||
template<class T> T*& PointerVar(FName field);
|
||||
inline int* IntArray(FName field);
|
||||
|
||||
// Make sure native data is wiped correctly since it has no read barriers.
|
||||
void ClearNativePointerFields(const TArray<FName>& types);
|
||||
|
||||
// This is only needed for swapping out PlayerPawns and absolutely nothing else!
|
||||
virtual size_t PointerSubstitution (DObject *old, DObject *notOld, bool nullOnFail);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue