Closed xunjieli closed 4 years ago
@mlin Hi Mike, WDYT?
I have a BCFData
implemented with a LRU cache.
dataset_header()
involves one lookup into the LRU cache (which caches the hdr and vcf file handle). My dataset_range()
implementation involves getting the vcf file handle again, so it'd be very helpful if I can retain a refcount of the |hdr| param and put it with the vcf file handle in the same LRU cache.
Abandoning this. I've found a different approach.
Pass hdr as a const std::shared_ptr reference will allow implementation to retain a ref count to the hdr pointer.