×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    Unable to run application error inside the application

    I recieve unable to run application error inside my application.

    I use Nokia6610 to develope simple application.
    Basically, application has lots of Forms. Forms have a image, ticker, long string/s. When I use commands to jump between those forms after a while I get this error.

    Some code:

    else if (c == cmdHumaBack)
    {
    Runtime.getRuntime().gc(); // Should clean memory
    // doesn't it?
    display.setCurrent(fmMain);
    }

    Java emulator doesn't show memory overflow...

    My program has about 30 Forms. Every Form is runable if application is "fresh" so I suppose it's still memory problem. How to solve it?

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    19
    Unable to run application is pretty much always a memory problem. You will have to use a technique to load forms in and out of memory.

    If you are assigning the forms with the new command, this will simply be a matter of setting the form object to null. Invoking the garbage collector for safety is probably not a bad idea.

    Depending on jar size available, you might want a separate function to load and populate and unload each form. To bullet proof, set up a 'IsSubForm1Loaded' boolean variable that is tested whenever code is entered that requires a particular form to be loaded, and call the load function if required.

    Danny.
    Tin Can Games.

    www.tincangames.com

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    12
    I solved it by using not append, but insert and delete by index and the running the GC. thanks for your advise, I'll keep in mind that.

Posting Permissions

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