×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    4

    Memory not released after player closed 6680

    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){ }
    }

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: Memory not released after player closed 6680

    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

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    4

    Re: Memory not released after player closed 6680

    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 20:45.

Similar Threads

  1. 6680 memory specs
    By AnnaThon in forum General Development Questions
    Replies: 9
    Last Post: 2005-12-09, 11:20
  2. 6680 maxing out memory too fast
    By earamsey in forum Mobile Java General
    Replies: 0
    Last Post: 2005-10-21, 22:15
  3. 6680 Memory Problems -- URGENT!!!!
    By earamsey in forum Mobile Java General
    Replies: 0
    Last Post: 2005-10-17, 01:11
  4. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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