Files
test/source/blender/windowmanager/intern
Bastien Montagne 65c5721c5a Fix (unreported): MEM_new/MEM_freeN mistaches.
Calling `MEM_freeN` on data allocated with `MEM_new` is bad, since it
will not call a destructor matching the one invoked as part of
`MEM_new`.

While in practice cases fixed below were 'not a problem' currently, as
they are trivial Cpp types (and therefore their destructor is doing
nothing), `MEM_freeN` has no way to ensure it is dealing with such a
trivial data type, so allowing such mismatch is dirty and dangerous.

Note that almost all fixed cases look more like unintentional mistakes
(mis-usages of `MEM_new` instead of `MEM_cnew`).

NOTE: There is one more (known!) case in the asset code, which fix is
slightly less trivial, and will go through a separate PR.

NOTE: This is a by-product of some work to detect such invalid usages of
`MEM_freeN` on memory chunks allocated with `MEM_new`.

Pull Request: https://projects.blender.org/blender/blender/pulls/123691
2024-06-24 18:42:26 +02:00
..
2024-06-03 23:17:41 +02:00
2024-06-21 22:37:33 +02:00
2024-04-29 14:04:16 +02:00
2024-06-21 06:06:14 +02:00