Opened 18 years ago
Closed 15 years ago
#1665 closed defect (fixed)
MapScript needs to run msSetup/msCleanup automagically
Reported by: | sdlime | Owned by: | sdlime |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-SWIG | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
This really applies to multiple components but I had to pick one, so MapScript- SWIG gets it. This stems from the use of the GEOS C api which requires us to call a GEOSinit() and GEOSfinish() when using the library. You definitely want to do that only once when MapScript or the CGI are loaded. The MapServer C code already defines a couple of functions msSetup/msCleanup to do this. They are being used for some OGR cleanup and so on. These would be logical places for the GEOS functions. Besides that we need to: - add them to PHP's MSINIT and MSHUTDOWN functions - add them to language specific interface files for all relevant SWIG languages. Python is done (at least for msSetup), so Perl, Ruby, C# and Java need to be done. - add them to mapserv.c, being mindfull of fast CGI support Steve
Attachments (1)
Change History (10)
comment:4 by , 18 years ago
Cc: | added |
---|
comment:5 by , 18 years ago
Cc: | added |
---|
Java mapscript indeed calls msSetup() on library loading, but msCleanup() not yet. I'll do some checks to see how the latter can be achieved.
comment:6 by , 18 years ago
Add perl extension interface files following Sean's python lead. msSetup() is called, but not msCleanup(). Gotta figure out how... Steve
comment:7 by , 18 years ago
I think calling msCleanup automatically is low priority. I only did it for Python just for the sake of completeness. For Java and C#, maybe it would be best to require users to call msSetup() explicitly at the start of their programs, and then call msCleanup() at the end.
comment:9 by , 15 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I believe this is now complete... Closing.
Steve
Note:
See TracTickets
for help on using tickets.