File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Addressbook Memory Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Addressbook Memory" Watch "Addressbook Memory" New topic
Author

Addressbook Memory

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
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

Joined: Sep 17, 2001
Posts: 548
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.


RR Kumaran
SCJP 1.4
 
 
subject: Addressbook Memory
 
Threads others viewed
Sorting by using Comparator
Address Book Java Issues
Sorting
Sorting of Java objects
getter and setter methods.
IntelliJ Java IDE