[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kvm-interest
Subject:    Re: Memory problems on Nokias like the 6610, 7210, 7250
From:       Kirk Bateman <kbateman () SYNAPTIC-TECHNOLOGIES ! COM>
Date:       2005-10-05 15:29:50
Message-ID: 41265.81.144.224.82.1128526190.squirrel () kbateman ! is-a-geek ! com
[Download RAW message or body]

I would possibly store the data to RMS and then force a quit of the
application or something, so the second time its run, there is no memory
leak.

Here's the report from j2mepolish on the bug..

When you call getResourceAsStream() memory will be leaked in the same size
as the resource. This is also the case when it is used indirectly, e.g. in
Image.createImage().

Cheers

Kirk

On Wed, October 5, 2005 4:13 pm, Zemlyanukha Mikhail wrote:
> Thanks for the info.
>
> As for workarounds - looks like that data could be copied from jar to
> RMS, to lose memory once, than reloaded from RMS as many as need?
>
> Just interesting if anybody uses it.
>
> How much memory leaks per getResourceAsStream() call? Doesn't depend on
> number of bytes being read?
>
> I heard that the bug is only for S60 DP1 (not S40), is that true?
>
> Mike
>
>> -----Original Message-----
>> From: Tijl Houtbeckers [mailto:thoutbeckers@SPLENDO.COM]
>> Sent: Wednesday, October 05, 2005 7:03 PM
>> To: KVM-INTEREST@JAVA.SUN.COM
>> Subject: Re: Memory problems on Nokias like the 6610, 7210, 7250
>>
>>
>> On Wed, 05 Oct 2005 16:40:53 +0200, Kirk Bateman
>> <kbateman@SYNAPTIC-TECHNOLOGIES.COM> wrote:
>>
>> > Doesn't it ?
>>
>> No, thankfully not.
>>
>> > getResourceAsStream() bug does also affect indirect calls, such as
>> > Image.getImage("")..
>>
>> Right. So only when you read data from inside the jar file.
>> Not sockets,
>> bytearrays, etc. and as far as I know, not RMS, which then
>> could be used
>> as a workaround.
>>
>> That doesn't take away how incredibly stupid it is. I'm
>> having difficulty
>> choosing this one, or the other recent Nokia Inputstream bug
>> (read() never
>> working with network connections) as "Most Stupid Java Bug Ever (tm)"
>>
>> =============================================================>
>> ============> To unsubscribe, send email to listserv@java.sun.com and
>> include in the body
>> of the message "signoff KVM-INTEREST".  For general help,
>> send email to
>> listserv@java.sun.com and include in the body of the message "help".
>>
>
> ==========================================================================To
> unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff KVM-INTEREST".  For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>


--
Kirk Bateman
Managing Director
Synaptic Technologies Limited (UK)
e: kbateman@synaptic-technologies.com
b: www.synaptic-technologies.com/blog/
w: www.synaptic-technologies.com

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic