Hi,
  Here is a sample code in java that queries GD in a loop.
  Each time the query is executed, around 6-7 MB of memory is
  used up. Has anyone faced the same problem ?


import jgd.JGDQuery;
import jgd.jaxb.Results;
import jgd.register.JGDRegister;

public class practice
{
        int cutOff;
        JGDQuery query = null;
        public  practice(int K)
        {
                cutOff = K;
                System.out.println("cutoff = "+cutOff);
                try
                {
                        query = new JGDQuery("search");
                }
                catch(Exception e)
                {
                        e.printStackTrace();
                }
                query.setNum(cutOff);
        }
        public  void Search(String search_string)
        {

                try
                {
                        query.setQueryString("\""+search_string+"\"");
                        Results results = query.execute();
                        results = null;
                }
                catch(Exception e)
                {
                        e.printStackTrace();
                }
        }

        public static void main(String args[])
        {

                try
                {
                        JGDRegister reg = new JGDRegister();
                        reg.register();
                        Thread.sleep(10);
                }
                catch(Exception e)
                {
                        e.printStackTrace();
                }

                practice conngd = new practice(10);

                while(true)
                        conngd.Search("Google");


        }

};



Thanks,
 kiran

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to