<div dir="ltr"><div>No, i never said that. I said that i have a problem with the way i'm using memory in my code currently (which is the result of the code doing stuff i didn't originally planned - in particular i didn't plan to have partial lightmap calculations) and i want to redesign it. Previously i would do either something like manual refcounting or use some sort of lightmap manager that would take care of managing the memory.<br>
<br></div><div>What i'm thinking right now is to simply create the lightmap objects (as interfaces) from the lightmapper side and send them to the 3D world side. My only concern for now is if interfaces are thread safe (that is, what happens if two threads keep a reference for the same object) or i need to do my own locking.<br>
</div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 3:09 PM, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graeme@geldenhuys.co.uk" target="_blank">graeme@geldenhuys.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-03-21 12:55, Kostas Michalopoulos wrote:<br>
> properties. That could save a lot of headaches i have with my 3D world<br>
> editor's lightmap generation (currently there is some wrong memory<br>
> deallocation somewhere that crashes the editor in partial lightmap<br>
<br>
<br>
</div>Don't be fooled to think Interfaces is the answer to all memory issues.<br>
The use of Interfaces is an "advanced topic". There are many pitfalls<br>
you need to look out for when using them.<br>
<div class="im HOEnZb"><br>
<br>
Regards,<br>
- Graeme -<br>
<br>
--<br>
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal<br>
<a href="http://fpgui.sourceforge.net/" target="_blank">http://fpgui.sourceforge.net/</a><br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</div></div></blockquote></div><br></div>