Skip to content
Unverified Commit e2279da7 authored by Steven Perron's avatar Steven Perron Committed by GitHub
Browse files

Remove the static maps from CheckDecorationsCompatibility (#2327)

* Remove the static maps from CheckDecorationsCompatibility

There are a few data structures in the function
`CheckDecorationsCompatibility` that are allocated using `new` and their
address is stored in a static pointer.  This code pattern causes the
MSVC memory leak checker to say there is a memory leak.  Some people
are interested in keeping that clean.

To work around it, I have replaced them with either a function or an
array of POD types.  The array can be kept as a static directly because
it has a trivial destructor, and we don't have to worry about it being
destroyed too early.

Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/2317.
parent 8915a7c8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment