ULevel::SortActorList Memory Leak


In the function ULevel::SortActorList, at the point when the net-relevant actors are being added into the NewActors array, the WorldSettings pointer is being added into the array for a second time.

Yesterday I had an array of around 160 actors when only 6 or 7 were in the level.

I can fix it locally by just adding the ‘Actor != WorldSettings’ check in the second loop.

Is this the correct fix or should ‘IsNetActor(WorldSettings)’ return false?


Hey -

It sounds like you found a legitimate fix. The best way to have this fix included into the engine would be to enter a pull request (https://github.com/EpicGames/UnrealEngine/compare?expand=1) with your specific changes.