Files
test/source
Julian Eisel 3dfd9d84eb Fix memory leak when using grease pencil clone brush
Caused by parallel access to static clipboard storage: Multiple threads
could end up calling `ensure_grease_pencil_clipboard()` in parallel.
Here this resulted in a surprisingly reliable memory leak.

Use a simple mutex lock to prevent unsynchronized access.

Steps to reproduce were:
- Add Grease Pencil object
- Enter grease pencil Sculpt mode
- Select Clone brush asset
- Click in 3D Viewport
- Quit Blender (see console log for leak reports)

Pull Request: https://projects.blender.org/blender/blender/pulls/125428
2024-07-25 17:40:01 +02:00
..