Even if I loaded it directly from Resources, wouldn't it still hang around level to level if I can't figure out what's keeping a reference to it?
There's this in my UISceneList class
static private UISceneList thisList = null;
When I first saw that, I thought "there's the problem". So I clean it up like this:
/*
-----------------------
OnDestroy()
-----------------------
*/
void OnDestroy() {
// this clears the fracking reference to the scene item prefabs that were still in
// memory because thisList is static
itemPrefab = null;
listItems.Clear();
if ( thisList == this ) {
thisList = null;
}
}
That didn't fix it.. but maybe that class is never getting destroyed
I'll investigate some more.. and probably remove the static reference.
thanks