constructors returning object by reference may cause access violation
Some of the mapscript objects have constructors with parameters containing the
reference of the parent object (eg. layerObj, classObj, styleObj).
Depending on the parameter the current implementation of thoose constructors
return a newly created object or a reference on an existing object.
The current SWIG C# implementation always treats the constructed object as a
newly created object so the destruction of the contained unmanaged memory may be
executed twice.
Deterministic finalization of constructed object may prevent this error to be
manifested, since the desctuctor calls free only if the parent object does not
exist.
Change History
(3)
Resolution: |
→ fixed
|
Status: |
new → closed
|