To reproduce the leak:
- Compile with WITH_PYTHON_SAFETY.
- Start Blender.
- Switch to shader editor.
- Close Blender.
rna_global_pool len: 64 0x60c0001715b8 <----- This is the "main" leak. memory pool len: 48 0x60b0001454d8 BLI_Mempool Chunk len: 2024 0x61d000f8a2b8 ghash_buckets_resize len: 88 0x60e0002dd718 rna_id len: 64 0x60c000161478 ghash_buckets_resize len: 40 0x60b00012fdc8 memory pool len: 48 0x60b00012fe78 BLI_Mempool Chunk len: 2024 0x61d000e916b8
No idea if I put this code in the right place, probably not. The leak is not really harmful currently. I just quickly looked into it because I was seeing it very often in my debug builds and wanted to know what is causing it.