Ticket #1743 (closed defect: fixed)
constructors returning object by reference may cause access violation
| Reported by: | szekerest | Owned by: | szekerest |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript-SWIG | Version: | unspecified |
| Severity: | critical | Keywords: | |
| Cc: |
Description
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
Note: See
TracTickets for help on using
tickets.
