Mapscript ,Mono, Apache and Linux : a great story
Xavier Mauclaire
xavier.mauclaire at GEOTER.FR
Wed Jun 21 12:30:48 PDT 2006
Tamas
Do you think i may install an older version of mapserver, the 4.8.0 or other
one ?
I'm very annoyed
regards
-----------------------------------------
Xavier Mauclaire
-------------------------------------------------------
-----Message d'origine-----
De : Tamas Szekeres [mailto:szekerest at gmail.com]
Envoyé : vendredi 16 juin 2006 15:57
À : Xavier Mauclaire
Cc : MAPSERVER-USERS at lists.umn.edu
Objet : Re: [UMN_MAPSERVER-USERS] Mapscript ,Mono, Apache and Linux : a
great story
Xavier,
> All the layerObj object i use in my program are déclared in the
> mapfile so i don't need to create layerObj from scratch using the
constructor.
> When you say that if a layerObj reference with a previously released
> native memory segment, it may causing the error, what are the
> consequences for my code ? Using the Dispose method is there the
> solution to avoid this problem ?
Most of the mapscript classes implement the IDisposable interface since they
maintain unmanaged memory segments. It is a good practice to explicitly call
Dispose (or by the using directive) if a newly created object is not needed
any more. However you might want to maintain the mapObj reference for a
longer period and the disposing will occur during the program destruction.
Getting an existing object reference (eg. as returned by
GetLayerByName) does not create a new object, so calling dispose is not
needed.
All of the objects internally maintain a flag indicating if it should free
the internal memory during the finalization. So calling Dispose in the
previous case might also not cause any problems.
So you may not have to take care much of these issues the existing problems
may dedicated to unproper handling of this reference and considered to be
fixed. However it is not so easy to locate the reason of the problem since
the crash will be slipped out on a subsequent finalization or the program
termination.
>
> How can i get CVS code ?
http://mapserver.gis.umn.edu/development/cvs/
using Tortoise CVS is fairly straightforward.
> Why this code works well under windows and scratches under linux ?
You may use different frameworks and CRT libraries. The problem may still
exists but not manifested.
Tamas
More information about the MapServer-users
mailing list