Fix memory leak in DRW_cache_gpencil_axes_get
The Batch was created using old function without GPU_BATCH_OWNS_VBO and the batch was not removed from memory
This commit is contained in:
@@ -605,7 +605,7 @@ GPUBatch *DRW_cache_gpencil_axes_get(void)
|
||||
GPU_vertbuf_attr_set(vbo, pos_id, i + 6, verts[indices[i]]);
|
||||
}
|
||||
|
||||
SHC.drw_gpencil_axes = GPU_batch_create(GPU_PRIM_LINES, vbo, NULL);
|
||||
SHC.drw_gpencil_axes = GPU_batch_create_ex(GPU_PRIM_LINES, vbo, NULL, GPU_BATCH_OWNS_VBO);
|
||||
}
|
||||
return SHC.drw_gpencil_axes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user