Re: [mapserver-users] mapscript.jar in java

2012-09-13 Thread forest21000
Thank Gaston Lucero,I've tried the method you told me.It really worked.



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/mapscript-jar-in-java-tp5001038p5001701.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapscript.jar in Java

2012-09-11 Thread Forest
Hi Everyone,
    I'm using mapscript.jar in Java project.When I use the DrawMap.java 
examples in my Java Application,the Memory will not increase,the codes is below:
    for (i=0; i1000; i++) {
mapObj map = new mapObj(mymapfile.map);

 imageObj img = map.draw();
}
    img.delete();
    map.delete();___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapscript.jar in java

2012-09-11 Thread Forest







Hi Everyone,
    I'm using mapscript.jar in Java project.When I use the DrawMap.java 
examples in my Java Application,the Memory will not increase,the codes is below:
    for (i=0; i1000; 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!
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] mapscript.jar in java

2012-09-11 Thread Forest
Hi,
   Sorry, I forget to tell you the version of my Development env:
   ms4w-3.0+Tomcat 5.5+eclipse helio+jdk 1.6.
   
   excepted for your answers!___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript.jar in java

2012-09-11 Thread forest21000
Sorry, I forget to tell you the version of my Development env:
   ms4w-3.0+Tomcat 5.5+eclipse helio+jdk 1.6.
  
   excepted for your answers!



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/mapscript-jar-in-java-tp5001038p5001050.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript.jar in java

2012-09-11 Thread Gaston Lucero
I use System.gc() before  map.Draw() And the memory remains stable,
Currently I use Java 7, but earlier in java 6 also works
System.gc has several improvements in Java 7, you should try it
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript.jar in java

2012-09-11 Thread forest21000
Thanks for your answer. Do you also use mapscript.jar in servlet?



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/mapscript-jar-in-java-tp5001038p5001106.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript.jar in java

2012-09-11 Thread forest21000
And What's your system?XP , 2003 server or Linux?



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/mapscript-jar-in-java-tp5001038p5001109.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript.jar in java

2012-09-11 Thread Umberto Nicoletti
Please note that growing memory usage is not necessarily symptom of a
problem. On the other hand memory not being released IS a problem.

Invoking programmatically the garbage collector does nothing towards
addressing memory leaks and, almost certainly in both cases, will
reduce the overall JVM performance.

As far as memory leaks are concerned Mapserver/Mapscript should be
mostly leak free, but ymmv depending on the features you are using.
If you are afraid (or know) that mapscript is leaking memory please
run it through Valgrind, then open an issue with both a test case and
a Valgrind output.

Best regards,
Umberto


On Tue, Sep 11, 2012 at 4:30 PM, Gaston Lucero gaston.luce...@gmail.com wrote:

 I use System.gc() before  map.Draw() And the memory remains stable,
 Currently I use Java 7, but earlier in java 6 also works
 System.gc has several improvements in Java 7, you should try it

 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapscript.jar in java

2012-09-11 Thread forest21000
Thanks for your answer,can Valgrind run in Windows platform?Can you provide
some examples to me?If you have,can you send them to my
email:forest21...@yahoo.cn?thanks a lot!



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/mapscript-jar-in-java-tp5001038p5001190.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users