da05bff96c2209c9acd3fa3255ed001198d00cc3
This one was a bit more involved than the previous ones, since the mismatch was intentional here, and happened on a non-trivial type. It was done because the new object (managed by the `unique_ptr`) steals the internal data of the original object. Calling `MEM_delete` (and therefore the destructor of the `AssetMetaData` object) would then lead to access-after-free and double-freeing errors. This is addressed by adding two new 'copy' and 'move' constructors to this type. The copy one ensures that deep-copy of internal data happens as expected, and allows to simplify greatly the code in `BKE_asset_metadata_copy`, which becomes a mere wrapper around it. The move one allows `make_unique` to properly steal (and clear) the internal data of the source object, which can then safely be deleted. Pull Request: https://projects.blender.org/blender/blender/pulls/123693
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
