OSDN Git Service

Fix memory leak when aborting routine generation.
authorNicolas Capens <capn@google.com>
Wed, 5 Jul 2017 18:10:46 +0000 (14:10 -0400)
committerNicolas Capens <capn@google.com>
Wed, 5 Jul 2017 18:52:03 +0000 (18:52 +0000)
commit619a8c5a7275d5b2f6e162e056ac41e37281a569
treeba64b87213e2851098ad69f2dc7472973bac4117
parent9494572a1798d5148d18d3db57c06ce07d608d23
Fix memory leak when aborting routine generation.

The blitter aborts generating a Reactor routine when a less common
format is being used (causing fallback to statically compiled code). But
the intermediate Reactor and Subzero structures were not being freed. It
is fixed by deleting the global routine when the Function<> goes out of
scope and it hasn't been acquired yet.

Bug chromium:732691

Change-Id: I4904a467454e8e8d2ff0dbf64545823c9fd15802
Reviewed-on: https://swiftshader-review.googlesource.com/10408
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
src/Reactor/SubzeroReactor.cpp
src/Renderer/LRUCache.hpp