-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory release #459
Comments
The removeAllAssets() function will dispose the assets, and you should not try to use the assets after they have been disposed. The purpose of the dispose() functions is to make an object available for garbage collection. Have you found that objects are not garbage collected after they have been disposed? |
Yes it does not seem to dispose _mipMaps Array in BitmapTexture. |
There is no need to "dispose" an array. As long as the array is not being directly or indirectly referenced by the root display list of your application, i.e. as long as you don't keep a reference to the texture lying around, it will be garbage collected. |
That's weird because the bitmapData that referenced inside that array did not get disposed so maybe there is a reference to it. I have used sharedContext with Starling for my project. I can dig deeper and report back. |
Well, regardless I guess it doesn't hurt to explicitly dispose. We'll make sure that happens in the next development cycle. |
Thank you, I'll still try to help out. |
Calling AssetLibrary.removeAllAssets(); Will generate a null obj ref. (_methods)
Line 647-649 (DefaultScreenPass.as):
for (var i : uint = 0; i < _methods.length; ++i) {
addPasses(_methods[i].method.passes);
}
There should be a null check for _methods. When running
if (_methods != null) {
for (var i : uint = 0; i < _methods.length; ++i) {
addPasses(_methods[i].method.passes);
}
}
Also when disposing all bitmapData should be released.
Including _mipMaps in BitmapTexture.
The text was updated successfully, but these errors were encountered: