[Scummvm-devel] [Scummvm-cvs-logs] SF.net SVN: scummvm:[42555] scummvm/branches/gsoc2009-draci/engines/draci

Robert Špalek rspalek at gmail.com
Sun Jul 19 23:36:07 CEST 2009


2009/7/17 dkasak13 <dkasak13 at users.sourceforge.net>

> Revision: 42555
>          http://scummvm.svn.sourceforge.net/scummvm/?rev=42555&view=rev
> Author:   dkasak13
> Date:     2009-07-17 01:20:51 +0000 (Fri, 17 Jul 2009)
>
> Log Message:
> -----------
> * Modified the engine to leverage BArchive's memory management capabilities
> by using its pointers to data directly instead of copying
>
>        file = initArchive.getFile(1);
> -       _iconStatus = new byte[file->_length];
> -       memcpy(_iconStatus, file->_data, file->_length);
> +       _iconStatus = file->_data;
>        uint numIcons = file->_length;
>
> 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.

-- 
Robert Špalek <rspalek at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090719/c2299d71/attachment.html>


More information about the Scummvm-devel mailing list