Are you saying you append once and the textarea keeps taking up more memory?
no quite, this function is meant to be called on events with different messages, for some reason when the append function is used to add text to the textarea, the memory usage spikes, however if the text already existed, theres no memory usage for it.
i have narrowed down the cause of the issue so the text itself, but it only happens for 'appended' text.
my best guess is that the spark component textarea class is not brilliantly optimized.
i will definately file a bug report about this, but i fear that textarea may not be the only spark component or any component suffering from this.
i tested it with a simplified version:
- creating a spark textarea and using a button which triggers the append method of the textarea. i then spammed the button about 200 times and the adl.exe spiked well over 100,000k.
i then tried the previous method of appending to text:
- using textArea.text += "blah blah blah etc ETC (bunch of tabs) more text, and a few \n"; and with this approach the garbage collector did its job well.
somewhere in the RichEditableText class there are objects being instantiated and not being released, my best guess is they are related to saving the existing internal text formating which gives the 'appereance' that text is being appended, when really its just being scanned, deleted and replaced with the new text.
1 person found this helpful
To chime in, I have noticed this too in the example from the link below. I posted a reply in its comment section.
Marcidus, if you file a bug post a link please. Thanks.
its funny you posted that link, because thast the exact same example i used in my app which im having the RAM issue with.
EDIT: posted bug report
i wasnt 100% sure how to use the bug-report service, but i had a go at it.