• Post Reply Bookmark Topic Watch Topic
  • New Topic

Addressbook Memory

 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed addressbook like yahoo using java. Server saves each address information in each file. When user want to do sorting, server open files and read it and put in list object and using Collections.sort method i do sorting and render data back to client.
Now if it is above 8000 addresses is it good idea when everytime user do sort by last name or first name or email address or next 20 or prev20 to open files, put data in list object do sorting again & again? Will it be memory leak problem? If yes, what other alternative way I should go?
Thanks,
Angela
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
memory leak wont occur if you initialize the objects to null before using and after using and also it depends on the jvm heap size set and so you neednt worry about that if you take about object creation/destruction.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!