中的嵌入式位圖資產首次在此處發佈。有沒有辦法清除AS3/AIR
我正在創建一個AIR 3.0應用程序。
對於我的很多圖形資源,我使用Flex嵌入的元數據將位圖對象嵌入爲類,然後實例化它們。
問題是,它似乎從來沒有收到垃圾。我沒有在網上找到很多信息,但我看過一些似乎證實這一點的帖子。
無論何時,我的一個類被實例化爲具有這些嵌入資源,它們總是創建Bitmaps和BitmapDatas的新實例,而不是重用已存在的內容。這是一個巨大的記憶問題。而且我找不到任何方式去取消它們或讓它們留下記憶。
所以我能想到的唯一解決方案就是從磁盤加載圖形而不是使用嵌入標籤。但我寧願不要這樣做,因爲應用程序打包和安裝時,所有這些圖形資產都將位於最終用戶計算機上,而不是包含在SWF中。
Anyoen碰到這個?有一個解決方案?或者我可以想到的替代解決方案?
謝謝! Kyle