[RFC-24] USE_MAPSCRIPT configure flag

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Wed May 23 15:01:26 EDT 2007


On 5/23/07, Tamas Szekeres <szekerest at gmail.com> wrote:
> 2007/5/23, Umberto Nicoletti <umberto.nicoletti at gmail.com>:
> >
> > The cgi app does not need rfc24 because it does not add dynamically
> > layers at runtime (except for the special cases of the legend and
> > scalebar), and to keep the cgi running at the highest speed possible
> > rfc24 adopts the special USE_MAPSCRIPT flag to remove the unneeded
> > reference counting.
> > Anyway, the cgi compiled with USE_MAPSCRIPT works exactly like before,
> > maybe a bit slower.
> >
> > I have no objections on enabling mapscript by default if most of us agree.
> >
>
> I think we should give some help in the decision when to enable this
> option. For example currently ms4w supports the cgi application as
> well as the various mapscript bindings. Which option should Jeff use
> to continue supporting both in the ms4w package? Or should he separate
> the builds related to the targets and eventually provide 2 versions of
> the libmap.dll (a mapscript and a non mapscript version)
> I think USE_REFCOUNT instead of USE_MAPSCRIPT would describe better
> the effects behind this setting.
>

That's why I posted the patch here instead of applying it directly,
even though the RFC already described exactly what I was going to do.
I am available for discussing and optionally voting once again on this
issue.
Maybe we should start a separate thread for this?

> > > This option should also be added to the windows makefiles through nmake.opt.
> > >
> >
> > I'll look into it, even though I have no experience with Visual Studio.
> >
>
> I volunteer to make this addition upon the buildbot reconstruction
> after these changes :-)
>

OK, excellent and thanks!

> > > Is the RFC-24 complete with these changes? How about '3.6 Always give
> > > object ownership to SWIG' for example?
> >
> > RFC-24 should be done with regard to the objects marked so in the
> > tracking tables at the end of the rfc.
> >
>
> How would you organize this work. In my understanding the lack of
> these additions would result in memory leaks with the corresponding
> languages, right?

No, they would be unsafe to create at run time in mapscript as they
were before rfc-24. As we slowly incorporate all of them in rfc-24
they will be safe to use.

> Am I right that only the mapObj, layerObj, and classObj were affected
> by this reference counting approach. In this regard should the other

And styleObj at this time, yes.

> classes retain the original behaviour by not taking the ownership
> every time?
>

That's correct!

> IMO every class that might be a child of another should also be
> handled somehow.  Destroying the parent will also destroy the
> referenced memory of the children. Should those be treated by the
> various bindings? Do you have a reference implementation for this?
>

The reference implementation is always rfc-24, for all of them. As
I've said earlier luckily rfc-24 can be implemented in small steps,
while not compromising current and past functionaltiy.


Umberto

>
> Best regards,
>
> Tamas
>



More information about the mapserver-dev mailing list