@JoyBSun SkeletonDataAsset is not cached. If you hold no more references to a SkeletonDataAsset or SkeletonData, then the respective memory should be freed as normal. Note that e.g. AnimationReferenceAsset
and similar assets may reference a SkeletonDataAsset
as well, and access SkeletonData
once and then hold the reference until destroyed.
Also, any components like SkeletonAnimation
that are depending on SkeletonDataAsset
are loading the data once in form of SkeletonData
and then keep this loaded data around (keep a reference to it) until reset or destroyed. SkeletonData
includes all relevant skeleton data such as Bones, Animations, etc.
Regarding your code above: it only destroys a skeletonDataAsset, but if you've done nothing else, a SkeletonAnimation
GameObject will still hold a reference to the SkeletonData
that it initially loaded. Since you showed only a small section of code, too much context is missing to guess what else you did to remove any references to skeleton data.