[Red5devs] Memory leakage
Mondain
mondain at gmail.com
Wed Jun 25 15:47:34 PDT 2008
I'm not convinced there is a leak here after looking at the code. The cache
/ map will grow as new strings are added to it. If you dont want to use this
class you could certainly override it with your own that doesn't contain the
cache, this is the beauty of opensource :)
Paul
On Wed, Jun 25, 2008 at 10:01 AM, Mondain <mondain at gmail.com> wrote:
> I have not looked into this yet, but I believe this is the intended
> operation. The map is meant to speed things up by caching strings; I will
> take a look and see if it can be improved.
>
> Paul
>
>
> On Wed, Jun 25, 2008 at 9:56 AM, hutx <hutx at yahoo.com> wrote:
>
>>
>> Yes, I traced it by NetBeans Profiler.
>> The byte[] encoded is put in Map stringCache. But no
>> place to remove it from stringCache.
>>
>> Thanks a lot!
>>
>>
>> --- Daniel Rossi <spam at electroteque.org> wrote:
>>
>> > Is that the cause of it growing ?
>> >
>> > On 26/06/2008, at 2:40 AM, hutx wrote:
>> >
>> > >
>> > > Recently, I tried to develop an application.
>> > However,
>> > > I met a memory leak.
>> > >
>> > > org.red5.server.stream.PlaylistSubscriberStream
>> > > $PlayEngine.sendStartStatus()
>> > > org.red5.server.stream.PlaylistSubscriberStream
>> > > $PlayEngine.sendResetStatus()
>> > > org.red5.server.stream.PlaylistSubscriberStream
>> > > $PlayEngine.sendUnpublishedStatus()
>> > >
>> > > These functions invoke
>> > > org.red5.io.amf.Output.writeString(String str).
>> > >
>> > > The str is put a HashedMap. But no place removes
>> > the
>> > > str from HasedMap. Finally, it causes the memory
>> > > leakage.
>> > >
>> > > How to solve it?
>> > > Thanks a lot.
>> > > Sean
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > Red5devs mailing list
>> > > Red5devs at osflash.org
>> > >
>> >
>> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>> >
>> >
>> > _______________________________________________
>> > Red5devs mailing list
>> > Red5devs at osflash.org
>> >
>> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>> >
>>
>>
>>
>>
>>
>> _______________________________________________
>> Red5devs mailing list
>> Red5devs at osflash.org
>> http://osflash.org/mailman/listinfo/red5devs_osflash.org
>>
>
>
>
> --
> It is difficult to free fools from the chains they revere. - Voltaire
--
It is difficult to free fools from the chains they revere. - Voltaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5devs_osflash.org/attachments/20080625/cae194b0/attachment.html
More information about the Red5devs
mailing list