~smspillaz/folly/folly-git-master

Viewing all changes in revision 9642.

  • Committer: Facebook GitHub Bot
  • Author(s): Maged Michael
  • Date: 2021-05-04 18:56:53 UTC
  • Revision ID: git-v1:9454bc4556f16d88a38a50ce19d645c07ec565ff
HazptrDomain: Change DCHECK of tagged_empty() in dtor to a warning

Summary:
Replace DCHECK(tagged_empty()) with a warning.

The rationale is that the DCHECK was intended to help higher level users detect memory leaks, but since the DCHECK fails at domain destruction, the stack trace is not really helpful to users. By changing it to a warning, at least the user gets a hint that there may be a leak of object(s) that use hazptr_obj_cohort (e.g., ConcurrentHashMap, RequestContext).

Reviewed By: yfeldblum

Differential Revision: D28145864

fbshipit-source-id: 8a79e25efd21f0b1d713202f2fe8954c17a7d4de

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: