×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    25

    how to avoid OutofMemory Exception

    hi all,

    I am getting OutofMemory Exception when i adding some code snippet to my Canvas class.

    Can you please give me the reason why I am getting that Exception and suggest me some ways to fix that Exception

    thanks in advance

    lakshman

  2. #2
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: how to avoid OutofMemory Exception

    the heap memory is used when you launch your app to store the uncompressed jar classes
    so if your app is big, you might get an outofmemoryerror
    the way to avoid crashing the app every time you get it is to trap it, and in the catch block run a gc(); and try to unreference some variables

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    12

    Re: how to avoid OutofMemory Exception

    Maybe it helps you!

    You can adjust the heap size in the simulator, this helps you only in the simulator! But if your target system has more the the required 200 kB (by J2ME) it will also run on your mobile phone.

Similar Threads

  1. How to avoid "Connection closed during transmission" -exception?
    By anummiah in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2004-12-31, 21:00
  2. Catching an exception
    By btnokdev in forum Mobile Java General
    Replies: 2
    Last Post: 2003-10-11, 14:45
  3. J2ME cannot report exception line number???
    By dying in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-02, 09:08
  4. Series 60 Concept SDK throws an unknown exception
    By sagee in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2003-02-27, 12:10
  5. 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
  •  
×