• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

class unloading

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
As I understand the classes of a midlet suite are loaded by the kvm dynamically when needed, not all in one go at startup.
Are they ever unloaded before the application exits? Does this free up heap space? Is the garbage collector responsible for freeing up memory taken up by classes?
Thanks
Nick
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to manually dispose network connections, RMS stores and RMS enumerators etc -- just as what you do in J2SE. Everything else is taken care of by the GC. You can reduce the GC usage by reusing existing objects (Forms and StringBuffers) as much as possible.
 
Nick Bransby-Williams
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about the inter workings of the vm. At what point is a class's bytecodes loaded into memory from persistent storage (the first time the class loader find a reference to it from another class?) and when is it unloaded? And is the memory required for the bytecodes allocated from the heap shared with object data?
 
reply
    Bookmark Topic Watch Topic
  • New Topic