2009/7/17 dkasak13 <span dir="ltr"><<a href="mailto:dkasak13@users.sourceforge.net">dkasak13@users.sourceforge.net</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Revision: 42555<br>
          <a href="http://scummvm.svn.sourceforge.net/scummvm/?rev=42555&view=rev" target="_blank">http://scummvm.svn.sourceforge.net/scummvm/?rev=42555&view=rev</a><br>
Author:   dkasak13<br>
Date:     2009-07-17 01:20:51 +0000 (Fri, 17 Jul 2009)<br>
<br>
Log Message:<br>
-----------<br>
* Modified the engine to leverage BArchive's memory management capabilities by using its pointers to data directly instead of copying<br>
<br>
        file = initArchive.getFile(1);<br>
-       _iconStatus = new byte[file->_length];<br>
-       memcpy(_iconStatus, file->_data, file->_length);<br>
+       _iconStatus = file->_data;<br>
        uint numIcons = file->_length;<br>
<br>
 </blockquote><div>please add a bold and detailed comment here and reference to it to the other places, making very clear that the owner of the referred data is the BArchive instance and that pointing to it is safe because the lifetime of the location data structures is shorter than of the cache.  this is very important to comment well upon.<br>
 <br></div></div>-- <br>Robert Špalek <<a href="mailto:rspalek@gmail.com">rspalek@gmail.com</a>><br>