Strange mapscriptJNI_delete_1layerObj+0xf error killing Tomcat

Tamas Szekeres szekerest at GMAIL.COM
Fri Jun 1 10:44:50 EDT 2007


2007/6/1, Arkadi Shishlov <arkadi at mebius.lv>:

> I'm also interested what is the semantic of shapeObj.add() and layerObj.addFeature()?
>      shapeObj o = new shapeObj(MS_SHAPE_TYPE.MS_SHAPE_POINT.swigValue());
>      lineObj n = new lineObj();
>      n.add(rulerXY1);
>      o.add(n);
>      layer.addFeature(o);
> Then both shape and line goes out of scope. Is it prone to crash?
>

Both shapeObj.add() lineObj.add() and layerObj.addFeature() create a
clone of the objects before adding them to the list. Therefore there's
no need to transfer the ownership of the underlying C memory. You can
safely use these methods considering that you cannot alter the
properties of the added objects using the original reference. You
should get back the reference of the objects similarly as you have
done in the previous cases.

Best regards,

Tamas



More information about the mapserver-users mailing list