Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_shader_interface.cc
| Show All 16 Lines | |||||
| namespace blender::gpu { | namespace blender::gpu { | ||||
| /* TODO(fclem): add unique ID for debugging. */ | /* TODO(fclem): add unique ID for debugging. */ | ||||
| ShaderInterface::ShaderInterface() = default; | ShaderInterface::ShaderInterface() = default; | ||||
| ShaderInterface::~ShaderInterface() | ShaderInterface::~ShaderInterface() | ||||
| { | { | ||||
| /* Free memory used by name_buffer. */ | /* Free memory used by name_buffer. */ | ||||
| MEM_freeN(name_buffer_); | MEM_SAFE_FREE(name_buffer_); | ||||
| MEM_freeN(inputs_); | MEM_SAFE_FREE(inputs_); | ||||
| } | } | ||||
fclem: Use MEM_SAFE_FREE | |||||
| static void sort_input_list(MutableSpan<ShaderInput> dst) | static void sort_input_list(MutableSpan<ShaderInput> dst) | ||||
| { | { | ||||
| if (dst.size() == 0) { | if (dst.size() == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| Vector<ShaderInput> inputs_vec = Vector<ShaderInput>(dst.size()); | Vector<ShaderInput> inputs_vec = Vector<ShaderInput>(dst.size()); | ||||
| ▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines | |||||
Use MEM_SAFE_FREE