mapscript.jar in servlet

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

mapscript.jar in servlet

forest21000
This post has NOT been accepted by the mailing list yet.
Hi Everyone,
    I'm using mapscript.jar in Java project,my Development env is ms4w-3.0+Tomcat 5.5+eclipse helio+jdk 1.6. When I use the DrawMap.java examples in my Java Application,the Memory will not increase,the codes is below:
        for (i=0; i<1000; i++) {
             mapObj map = new mapObj("mymapfile.map");

           imageObj img = map.draw();
          img.delete();
          map.delete();
        }
   but When I use the code in my servlet project,the memory will increase very fast the code is below:
          mapObj map = new mapObj("mymapfile.map");

           imageObj img = map.draw();
           img.img.getBytes();
          img.delete();
          map.delete();
 
can anyone tell me how to solve the problem?thank you very much!