-
Notifications
You must be signed in to change notification settings - Fork 450
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
Better bitmap keying for FlxText #3081
Comments
is this to address this old issue? HaxeFlixel/flixel-addons#393 |
no that seems unrelated |
On an semi-related note, the current method also causes a memory leak whenever you try to edit a FlxText. I believe it's somehow not disposing of graphics or something. I tried just using the existing key and the memory leak went away however all of the FlxText's broke for obvious reasons |
Do you have a decent way to reproduce this memory leak? |
In my experience, it happens whenever I change the text field of an FlxText. I don't really have the time to make a reproducible test because it takes an absurd amount of time for a new Flixel project to compile |
how are you measuring memory?
it compiles immensely faster if you target something other than native desktop, I typically use HTML5 for testing, many use HL which is lightning fast |
source: https://github.com/HaxeFlixel/flixel/blob/dev/flixel/text/FlxText.hx#L893
FlxText bitmaps are keyed by their text, this seems like it would generate a lot of bitmaps unnecessarily. ideally we would generate a new bitmap if the dimensions of a textfield change, without having different fields of the same size use the same bitmap. maybe we can use ID, or get some kinda mem address?
The text was updated successfully, but these errors were encountered: