ver 4.1
I'm looking for a memory leak and I notice that many materials was found by memory profile
they are referenced by : 0 + 2 self references and Status leaked dynamically & run-time created Asset
all the name was followed (Instance)..
did anybody know the issue?
Materials memory leak
still tring to minimum the leak but I'll describe my step first.
- make many kind of prefab with skeletonanimation assigned
- instantiate them quickly and destroy without pool holded
- on every instantiated obj dead, instantiate another corpose prefab with empty skeletonanimation assigned
- assign the instantiated obj's skeleton asset to corpose's empty skeletonanimation, playing dead animation
@layerz With only the above steps 1-4, there is no code called which would programmatically create Textures at runtime (as repacking skins would). The skeleton's textures are loaded just as normal texture dependencies (SkeletonAnimation
referencing SkeletonDataAsset
, referencing SpineAtlasAsset
, referencing Material
, referencing the skeleton's atlas Texture
). It's the same as if you are creating prefabs of cubes with different materials using different textures each.
@layerz Sorry, I just noticed that you said Material leaks and not Texture leaks, my fault.
Please let us know if you can reproduce the issue in a minimal Unity reproduction project. Then please send us your minimal project as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at what's going wrong.