Re: [android-developers] Wierd memory leak

2010-10-07 Thread Daniel Drozdzewski
On Thursday, October 7, 2010, DanH danhi...@ieee.org wrote: Yep, substring MAY (or may not) decide to avoid copying the characters and simply keep a reference to the char array in the source String. A smart substring implementation wouldn't do this if the result string were quite short or the

Re: [android-developers] Wierd memory leak

2010-10-07 Thread Daniel Drozdzewski
On Thursday, October 7, 2010, DanH danhi...@ieee.org wrote: Yep, substring MAY (or may not) decide to avoid copying the characters and simply keep a reference to the char array in the source String. A smart substring implementation wouldn't do this if the result string were quite short or the

Re: [android-developers] Wierd memory leak

2010-10-07 Thread Daniel Drozdzewski
On Thursday, October 7, 2010, DanH danhi...@ieee.org wrote: Yep, substring MAY (or may not) decide to avoid copying the characters and simply keep a reference to the char array in the source String. A smart substring implementation wouldn't do this if the result string were quite short or the

[android-developers] Wierd memory leak

2010-10-06 Thread Alex
Hi everybody! First of all, sorry for my bad english ;-) After several hours of searching for the cause of a OutOfMemoryError, I found a wierd problem with Strings. To keep it simple, trimmed it down to something like this: ArrayListString someStringList = new ArrayListString(1000); for (int