decentraland / unity-explorer

Apache License 2.0
9 stars 10 forks source link

Road assets are not being unloaded when jumping to a world (Memory leak) #1992

Open QThund opened 2 months ago

QThund commented 2 months ago

Explorer Alpha build versions:

0.25.0-alpha

Issue Description:

Every time the player jumps to a world, road assets of the Genesis plaza are not unloaded. Then, when the player goes back to Genesis the system loads new road assets as if previous were unloaded, so you end up with 2 copies of the road assets in memory. If the player repeats the process, more and more roads accumulate.

STR:

1.Load Decentraland at Genesis plaza. 2.Jump to another world. 3.Go back to Genesis.

Expected behaviour:

When jumping to a world, road assets should be unloaded or, alternatively, if they are not unloaded they should be reused when going back to Genesis.

Current behaviour:

New road assets are loaded despite previous copies are still there.

Evidence:

https://github.com/user-attachments/assets/af9169d8-d9b6-4f25-a2dd-a544450f1946

QThund commented 1 month ago

There are 2 possible courses of action:

  1. All road assets are destroyed when leaving Genesis, and recreated later when coming back.
  2. No road asset is destroyed when leaving Genesis, and they are reused when coming back.

Things to take into consideration:

We chose option 1.