Skip to content

Commit cf97a12

Browse files
committed
Tie lifetime of typerefs to the ReflectionContext
We will be handing pointers to typerefs over the SwiftRemoteMirrors C API boundary, at which point it is unclear who will hold onto a shared pointer. The useful lifetime of a typeref is tied to the ReflectionContext for which they were created anyway so, when it goes away, all of those typerefs can go away anyway. We can't use LLVM's bump-pointer allocator here because we only build the Support library for the host. As a compromise, stuff new typeref pointers into a vector pool, where they will be taken down during ReflectionContext's destructor.
1 parent 20f5304 commit cf97a12

File tree

5 files changed

+473
-436
lines changed

5 files changed

+473
-436
lines changed

0 commit comments

Comments
 (0)