You Are Here:

Community: Developer Discussion Boards

#1 Old Memory not released after player closed 6680 - 2007-04-23, 16:30

Join Date: Jun 2006
Posts: 4
minimoo
Offline
Registered User
It seems closing a Player object, and setting it and its Controls to null, doesn't free up memory on the 6680. After several cycles of opening and closing in this way the phone throws an out of memory error.

Can anyone suggest fixes?

I'm loading the videos from the web if that makes any difference.

Code:
public void open()
{
            thread = new Thread(this);
            thread.start();
}

public void stop()
{
        try
        {
            p.stop();
        }
        catch(Exception e){ }
}

public void close()
{

  try
  {
      if(control!=null)
      {
           control.setVisible(false);
           control = null;
      }
      
     if(p!=null)
     {
               p.close();
               p = null;
      }

      thread = null;
      }
      catch(Exception e){ }
}

public void run()
{
     try
     {
       p = Manager.createPlayer(url);
       p.prefetch();
       control = (VideoControl)p.getControl("VideoControl");
       append((Item)(control.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null)));
        control.setVisible(true);
      }
      catch(Exception e){ }
}

public void play()
{
    try
    {
        p.start();
     }
     catch(Exception e){ }
}
Reply With Quote

#2 Old Re: Memory not released after player closed 6680 - 2007-04-23, 19:55

Join Date: Jun 2005
Posts: 928
dcrocha's Avatar
dcrocha
Offline
Forum Nokia Expert
Hi, how did you reach the conclusion that memory is not being freed up? Have you tried to check the amount of heap memory available before/after you use the player?

Daniel
Reply With Quote

#3 Old Re: Memory not released after player closed 6680 - 2007-04-23, 21:33

Join Date: Jun 2006
Posts: 4
minimoo
Offline
Registered User
It throws an exception with the message Symbian OS Error -4, which is out of memory right?

I'm not checking memory before opening the player. I'll change it to do that and see what I get, [but I'm sure I read on this forum that the method is unreliable on the 6680] Sorry, I was mistaken it's the N80.
Last edited by minimoo : 2007-04-23 at 21:45.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
6680 memory specs AnnaThon General Discussion 9 2005-12-09 12:20
6680 maxing out memory too fast earamsey Mobile Java General 0 2005-10-21 23:15
6680 Memory Problems -- URGENT!!!! earamsey Mobile Java General 0 2005-10-17 02:11
can not successfully link any sample using .NET lobotomat Symbian Tools & SDKs 2 2002-08-20 01:29

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ