Mapscript ,Mono, Apache and Linux : a great story

Tamas Szekeres szekerest at GMAIL.COM
Mon Jun 19 07:41:01 EDT 2006


Xavier,

I think the reason of the problem was happening outside of the code
fragment you have given before.
Would you send an entire sample that produces this behaviour on your system?

Thanks,

Tamas


2006/6/19, Xavier Mauclaire <xavier.mauclaire at geoter.fr>:
>
> Tamas
> Thanks you for the answer,
> Concerning the scratching problem under the Linux platform, what could you
> advise me to to ?
>
> Best 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