<div dir="ltr">No comments so far.<div><br><div>I've prepared a fix to show what I've meant by storing the outputformat instead of the renderer vtable in symbolObj.<div><br></div><div><a href="https://github.com/szekerest/mapserver/commit/f4a4a2831a3d6228181938c0761fa5caf06c6452">https://github.com/szekerest/mapserver/commit/f4a4a2831a3d6228181938c0761fa5caf06c6452</a><br>
</div><div><br></div><div>Let me know if such change can be applied in master.</div><div><br></div><div>This change also contains a fix for the memory leaks caused by the embedded scalebar and legend symbols which is necessary for making the refcount approach to work properly.</div>
<div><br></div><div>We might also utilizeĀ MS_REFCNT macros for the outputformat refcount handling too (which are not yet used), but that would involve further changes to be made in further files.</div><div><br></div><div>
Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br></div><div><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-20 17:42 GMT+02:00 Tamas Szekeres <span dir="ltr"><<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Devs,<div><br></div><div>Regarding to <a href="https://github.com/mapserver/mapserver/issues/3834" target="_blank">#3834</a>, I can see several hacks in the code attempting to fix the issue, but it seems we are still running into the same issue by getting a crash in msFreeSymbol at the line:</div>

<div><br></div><div>s->renderer->freeSymbol(s);<br></div><div><br></div><div>We've already been discussing about implementing a symbol cache at the renderers (and eliminate the need of maintaining back references to the renderer at symbolObj), however that seems to require fair amount of coding and testing at the first sight.</div>

<div><br></div><div>What if we change the renderer reference in symbolObj from rendererVTableObj to outputFormatObj (which contains the vtable)? Since the outputformat is reference counted we could make sure the outputformat (and the vtable) exists until the corresponding symbolObj is alive?</div>

<div><br></div><div><br></div><div>Best regards,</div><div><br></div><div>TamasĀ </div></div>
</blockquote></div><br></div></div></div></div></div>