Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY

Stream and memory leak.

Hi, I have a problem.
How do I play the radio, I use this code to stream:

 

                            _player = javax.microedition.media.Manager.createPlayer("hxxp://94.23.36.107:443;deviceside=false");
                            

 I keep listening to music and does not escape my memory after 30 minutes.

 

When I use this code:

 

InputStream nadzieja = Connector.openInputStream("hxxp://91.121.116.107:9100;deviceside=false");
_player = javax.microedition.media.Manager.createPlayer(nadzieja,"audio/mp3");

 After 30 minutes, dramatically reduces the memory all the time.

 

As I begin to listen to my 45 MB, after 30 minutes, begins to spin the hourglass, and the memory begins to fall ... 40MB ... 30MB ... 20. MB for the machine to reset itself.

 

How to solve this problem with the memory running away when I use "InputStream"?

The Player is not working ordinary AAC stream, just as I use the method of InputStream it works.